From 4fd1ab6f38212e25b1b0aad04aeb469323ad938f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 10 Jan 2026 02:11:16 +0000 Subject: [PATCH 1/2] feat: add support for enabling automigration from deprecated Terraform versions feat: added error code when failing import values from an external source PiperOrigin-RevId: 854277617 Source-Link: https://github.com/googleapis/googleapis/commit/6145b5ffe99d290c3d840136f310490d732acb04 Source-Link: https://github.com/googleapis/googleapis-gen/commit/25bb3c0347ce54b570d7da6398c666ff16ec8ed0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbmZpZy8uT3dsQm90LnlhbWwiLCJoIjoiMjViYjNjMDM0N2NlNTRiNTcwZDdkYTYzOThjNjY2ZmYxNmVjOGVkMCJ9 --- .../google-cloud-config/.OwlBot.yaml | 19 + .../google-cloud-config/.eslintignore | 7 + .../google-cloud-config/.eslintrc.json | 3 + .../google-cloud-config/.gitattributes | 4 + .../google-cloud-config/.gitignore | 14 + owl-bot-staging/google-cloud-config/.jsdoc.js | 55 + .../google-cloud-config/.mocharc.js | 33 + owl-bot-staging/google-cloud-config/.nycrc | 24 + .../google-cloud-config/.prettierignore | 6 + .../google-cloud-config/.prettierrc.js | 22 + .../google-cloud-config/CODE_OF_CONDUCT.md | 94 + .../google-cloud-config/CONTRIBUTING.md | 76 + owl-bot-staging/google-cloud-config/LICENSE | 202 + owl-bot-staging/google-cloud-config/README.md | 143 + .../google/cloud/config/v1/config.proto | 2356 + .../google-cloud-config/protos/protos.d.ts | 16568 ++++++ .../google-cloud-config/protos/protos.js | 43640 ++++++++++++++++ .../google-cloud-config/protos/protos.json | 5103 ++ .../generated/v1/config.create_deployment.js | 88 + .../generated/v1/config.create_preview.js | 86 + .../generated/v1/config.delete_deployment.js | 89 + .../generated/v1/config.delete_preview.js | 77 + .../generated/v1/config.delete_statefile.js | 68 + .../v1/config.export_deployment_statefile.js | 69 + .../generated/v1/config.export_lock_info.js | 62 + .../v1/config.export_preview_result.js | 63 + .../v1/config.export_revision_statefile.js | 63 + .../v1/config.get_auto_migration_config.js | 63 + .../generated/v1/config.get_deployment.js | 62 + .../generated/v1/config.get_preview.js | 62 + .../generated/v1/config.get_resource.js | 62 + .../v1/config.get_resource_change.js | 63 + .../generated/v1/config.get_resource_drift.js | 63 + .../generated/v1/config.get_revision.js | 62 + .../v1/config.get_terraform_version.js | 62 + .../generated/v1/config.import_statefile.js | 73 + .../generated/v1/config.list_deployments.js | 101 + .../generated/v1/config.list_previews.js | 101 + .../v1/config.list_resource_changes.js | 97 + .../v1/config.list_resource_drifts.js | 97 + .../generated/v1/config.list_resources.js | 95 + .../generated/v1/config.list_revisions.js | 101 + .../v1/config.list_terraform_versions.js | 92 + .../generated/v1/config.lock_deployment.js | 63 + .../generated/v1/config.unlock_deployment.js | 68 + .../v1/config.update_auto_migration_config.js | 67 + .../generated/v1/config.update_deployment.js | 87 + ...ippet_metadata_google.cloud.config.v1.json | 1359 + .../google-cloud-config/src/index.ts | 27 + .../src/v1/config_client.ts | 5673 ++ .../src/v1/config_client_config.json | 183 + .../src/v1/config_proto_list.json | 3 + .../src/v1/gapic_metadata.json | 341 + .../google-cloud-config/src/v1/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../system-test/install.ts | 49 + .../test/gapic_config_v1.ts | 5966 +++ .../google-cloud-config/tsconfig.json | 22 + .../google-cloud-config/webpack.config.js | 64 + 60 files changed, 84340 insertions(+) create mode 100644 owl-bot-staging/google-cloud-config/.OwlBot.yaml create mode 100644 owl-bot-staging/google-cloud-config/.eslintignore create mode 100644 owl-bot-staging/google-cloud-config/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-config/.gitattributes create mode 100644 owl-bot-staging/google-cloud-config/.gitignore create mode 100644 owl-bot-staging/google-cloud-config/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-config/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-config/.nycrc create mode 100644 owl-bot-staging/google-cloud-config/.prettierignore create mode 100644 owl-bot-staging/google-cloud-config/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-config/CODE_OF_CONDUCT.md create mode 100644 owl-bot-staging/google-cloud-config/CONTRIBUTING.md create mode 100644 owl-bot-staging/google-cloud-config/LICENSE create mode 100644 owl-bot-staging/google-cloud-config/README.md create mode 100644 owl-bot-staging/google-cloud-config/protos/google/cloud/config/v1/config.proto create mode 100644 owl-bot-staging/google-cloud-config/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-config/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-config/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_deployment.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_preview.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_deployment.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_preview.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_statefile.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_lock_info.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_preview_result.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_deployment.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_preview.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_change.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_drift.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_revision.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_terraform_version.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.import_statefile.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_deployments.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_previews.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_changes.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resources.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_revisions.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.lock_deployment.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.unlock_deployment.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_deployment.js create mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json create mode 100644 owl-bot-staging/google-cloud-config/src/index.ts create mode 100644 owl-bot-staging/google-cloud-config/src/v1/config_client.ts create mode 100644 owl-bot-staging/google-cloud-config/src/v1/config_client_config.json create mode 100644 owl-bot-staging/google-cloud-config/src/v1/config_proto_list.json create mode 100644 owl-bot-staging/google-cloud-config/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-config/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-config/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-config/test/gapic_config_v1.ts create mode 100644 owl-bot-staging/google-cloud-config/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-config/webpack.config.js diff --git a/owl-bot-staging/google-cloud-config/.OwlBot.yaml b/owl-bot-staging/google-cloud-config/.OwlBot.yaml new file mode 100644 index 00000000000..5afb0c11e0e --- /dev/null +++ b/owl-bot-staging/google-cloud-config/.OwlBot.yaml @@ -0,0 +1,19 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this 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. + +deep-copy-regex: + - source: /google/cloud/config/google-cloud-config-nodejs + dest: /owl-bot-staging/google-cloud-config + +api-name: config \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/.eslintignore b/owl-bot-staging/google-cloud-config/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-config/.eslintrc.json b/owl-bot-staging/google-cloud-config/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-config/.gitattributes b/owl-bot-staging/google-cloud-config/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/owl-bot-staging/google-cloud-config/.gitignore b/owl-bot-staging/google-cloud-config/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-config/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/google-cloud-config/.jsdoc.js b/owl-bot-staging/google-cloud-config/.jsdoc.js new file mode 100644 index 00000000000..a73893518ad --- /dev/null +++ b/owl-bot-staging/google-cloud-config/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2026 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/config', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-config/.mocharc.js b/owl-bot-staging/google-cloud-config/.mocharc.js new file mode 100644 index 00000000000..5eb34e86c87 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + +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 diff --git a/owl-bot-staging/google-cloud-config/.nycrc b/owl-bot-staging/google-cloud-config/.nycrc new file mode 100644 index 00000000000..81a95fc94b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/.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 +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/.prettierignore b/owl-bot-staging/google-cloud-config/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/owl-bot-staging/google-cloud-config/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/owl-bot-staging/google-cloud-config/.prettierrc.js b/owl-bot-staging/google-cloud-config/.prettierrc.js new file mode 100644 index 00000000000..7649ee3c254 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/google-cloud-config/CODE_OF_CONDUCT.md b/owl-bot-staging/google-cloud-config/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/CONTRIBUTING.md b/owl-bot-staging/google-cloud-config/CONTRIBUTING.md new file mode 100644 index 00000000000..3cbe099169f --- /dev/null +++ b/owl-bot-staging/google-cloud-config/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Config API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=config.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/LICENSE b/owl-bot-staging/google-cloud-config/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/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/owl-bot-staging/google-cloud-config/README.md b/owl-bot-staging/google-cloud-config/README.md new file mode 100644 index 00000000000..9c68b737b98 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/README.md @@ -0,0 +1,143 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [Infrastructure Manager API: Nodejs Client][homepage] + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority + +[![npm version](https://img.shields.io/npm/v/@google-cloud/config.svg)](https://www.npmjs.org/package/@google-cloud/config) + +Infrastructure Manager API client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [Infrastructure Manager API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/config/latest) +* [Infrastructure Manager API Documentation](https://cloud.google.com/infrastructure-manager/docs/overview) + +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 Infrastructure Manager API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-cloud/config +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | +| --------------------------- | --------------------------------- | +| create deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.create_deployment.js) | +| create preview | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.create_preview.js) | +| delete deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.delete_deployment.js) | +| delete preview | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.delete_preview.js) | +| delete statefile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.delete_statefile.js) | +| export deployment statefile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js) | +| export lock info | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.export_lock_info.js) | +| export preview result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.export_preview_result.js) | +| export revision statefile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js) | +| get auto migration config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js) | +| get deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_deployment.js) | +| get preview | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_preview.js) | +| get resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource.js) | +| get resource change | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js) | +| get resource drift | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js) | +| get revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_revision.js) | +| get terraform version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_terraform_version.js) | +| import statefile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.import_statefile.js) | +| list deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_deployments.js) | +| list previews | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_previews.js) | +| list resource changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js) | +| list resource drifts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js) | +| list resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resources.js) | +| list revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_revisions.js) | +| list terraform versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js) | +| lock deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.lock_deployment.js) | +| unlock deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.unlock_deployment.js) | +| update auto migration config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js) | +| update deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.update_deployment.js) | +| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json) | + + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/config@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=config.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config diff --git a/owl-bot-staging/google-cloud-config/protos/google/cloud/config/v1/config.proto b/owl-bot-staging/google-cloud-config/protos/google/cloud/config/v1/config.proto new file mode 100644 index 00000000000..c45d7e95e38 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/protos/google/cloud/config/v1/config.proto @@ -0,0 +1,2356 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.config.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.Config.V1"; +option go_package = "cloud.google.com/go/config/apiv1/configpb;configpb"; +option java_multiple_files = true; +option java_outer_classname = "ConfigProto"; +option java_package = "com.google.cloud.config.v1"; +option php_namespace = "Google\\Cloud\\Config\\V1"; +option ruby_package = "Google::Cloud::ConfigService::V1"; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/ServiceAccount" + pattern: "projects/{project}/serviceAccounts/{service_account}" +}; +option (google.api.resource_definition) = { + type: "cloudbuild.googleapis.com/WorkerPool" + pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}" +}; + +// Infrastructure Manager is a managed service that automates the deployment and +// management of Google Cloud infrastructure resources. +service Config { + option (google.api.default_host) = "config.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project + // and location. + rpc ListDeployments(ListDeploymentsRequest) + returns (ListDeploymentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/deployments" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about a [Deployment][google.cloud.config.v1.Deployment]. + rpc GetDeployment(GetDeploymentRequest) returns (Deployment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deployments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a [Deployment][google.cloud.config.v1.Deployment]. + rpc CreateDeployment(CreateDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/deployments" + body: "deployment" + }; + option (google.api.method_signature) = "parent,deployment,deployment_id"; + option (google.longrunning.operation_info) = { + response_type: "Deployment" + metadata_type: "OperationMetadata" + }; + } + + // Updates a [Deployment][google.cloud.config.v1.Deployment]. + rpc UpdateDeployment(UpdateDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{deployment.name=projects/*/locations/*/deployments/*}" + body: "deployment" + }; + option (google.api.method_signature) = "deployment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Deployment" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a [Deployment][google.cloud.config.v1.Deployment]. + rpc DeleteDeployment(DeleteDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/deployments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Deployment" + metadata_type: "OperationMetadata" + }; + } + + // Lists [Revision][google.cloud.config.v1.Revision]s of a deployment. + rpc ListRevisions(ListRevisionsRequest) returns (ListRevisionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deployments/*}/revisions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about a [Revision][google.cloud.config.v1.Revision]. + rpc GetRevision(GetRevisionRequest) returns (Revision) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deployments/*/revisions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets details about a [Resource][google.cloud.config.v1.Resource] deployed + // by Infra Manager. + rpc GetResource(GetResourceRequest) returns (Resource) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [Resources][google.cloud.config.v1.Resource] in a given revision. + rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources" + }; + option (google.api.method_signature) = "parent"; + } + + // Exports Terraform state file from a given deployment. + rpc ExportDeploymentStatefile(ExportDeploymentStatefileRequest) + returns (Statefile) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deployments/*}:exportState" + body: "*" + }; + } + + // Exports Terraform state file from a given revision. + rpc ExportRevisionStatefile(ExportRevisionStatefileRequest) + returns (Statefile) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState" + body: "*" + }; + } + + // Imports Terraform state file in a given deployment. The state file does not + // take effect until the Deployment has been unlocked. + rpc ImportStatefile(ImportStatefileRequest) returns (Statefile) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deployments/*}:importState" + body: "*" + }; + option (google.api.method_signature) = "parent,lock_id"; + } + + // Deletes Terraform state file in a given deployment. + rpc DeleteStatefile(DeleteStatefileRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deployments/*}:deleteState" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Locks a deployment. + rpc LockDeployment(LockDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deployments/*}:lock" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Deployment" + metadata_type: "OperationMetadata" + }; + } + + // Unlocks a locked deployment. + rpc UnlockDeployment(UnlockDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deployments/*}:unlock" + body: "*" + }; + option (google.api.method_signature) = "name,lock_id"; + option (google.longrunning.operation_info) = { + response_type: "Deployment" + metadata_type: "OperationMetadata" + }; + } + + // Exports the lock info on a locked deployment. + rpc ExportLockInfo(ExportLockInfoRequest) returns (LockInfo) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deployments/*}:exportLock" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a [Preview][google.cloud.config.v1.Preview]. + rpc CreatePreview(CreatePreviewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/previews" + body: "preview" + }; + option (google.api.method_signature) = "parent,preview"; + option (google.longrunning.operation_info) = { + response_type: "Preview" + metadata_type: "OperationMetadata" + }; + } + + // Gets details about a [Preview][google.cloud.config.v1.Preview]. + rpc GetPreview(GetPreviewRequest) returns (Preview) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/previews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [Preview][google.cloud.config.v1.Preview]s in a given project and + // location. + rpc ListPreviews(ListPreviewsRequest) returns (ListPreviewsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/previews" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a [Preview][google.cloud.config.v1.Preview]. + rpc DeletePreview(DeletePreviewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/previews/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Preview" + metadata_type: "OperationMetadata" + }; + } + + // Export [Preview][google.cloud.config.v1.Preview] results. + rpc ExportPreviewResult(ExportPreviewResultRequest) + returns (ExportPreviewResultResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/previews/*}:export" + body: "*" + }; + } + + // Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a + // given project and location. + rpc ListTerraformVersions(ListTerraformVersionsRequest) + returns (ListTerraformVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/terraformVersions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about a + // [TerraformVersion][google.cloud.config.v1.TerraformVersion]. + rpc GetTerraformVersion(GetTerraformVersionRequest) + returns (TerraformVersion) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/terraformVersions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists ResourceChanges for a given preview. + rpc ListResourceChanges(ListResourceChangesRequest) + returns (ListResourceChangesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/previews/*}/resourceChanges" + }; + option (google.api.method_signature) = "parent"; + } + + // Get a ResourceChange for a given preview. + rpc GetResourceChange(GetResourceChangeRequest) returns (ResourceChange) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/previews/*/resourceChanges/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List ResourceDrifts for a given preview. + rpc ListResourceDrifts(ListResourceDriftsRequest) + returns (ListResourceDriftsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/previews/*}/resourceDrifts" + }; + option (google.api.method_signature) = "parent"; + } + + // Get a ResourceDrift for a given preview. + rpc GetResourceDrift(GetResourceDriftRequest) returns (ResourceDrift) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/previews/*/resourceDrifts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get the AutoMigrationConfig for a given project and location. + rpc GetAutoMigrationConfig(GetAutoMigrationConfigRequest) + returns (AutoMigrationConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/autoMigrationConfig}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the AutoMigrationConfig for a given project and location. + rpc UpdateAutoMigrationConfig(UpdateAutoMigrationConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{auto_migration_config.name=projects/*/locations/*/autoMigrationConfig}" + body: "auto_migration_config" + }; + option (google.api.method_signature) = "auto_migration_config,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AutoMigrationConfig" + metadata_type: "OperationMetadata" + }; + } +} + +// Enum values to control quota checks for resources in terraform +// configuration files. +enum QuotaValidation { + // The default value. + // QuotaValidation on terraform configuration files will be disabled in + // this case. + QUOTA_VALIDATION_UNSPECIFIED = 0; + + // Enable computing quotas for resources in terraform configuration files to + // get visibility on resources with insufficient quotas. + ENABLED = 1; + + // Enforce quota checks so deployment fails if there isn't sufficient quotas + // available to deploy resources in terraform configuration files. + ENFORCED = 2; +} + +// A Deployment is a group of resources and configs managed and provisioned by +// Infra Manager. +message Deployment { + option (google.api.resource) = { + type: "config.googleapis.com/Deployment" + pattern: "projects/{project}/locations/{location}/deployments/{deployment}" + }; + + // Possible states of a deployment. + enum State { + // The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0; + + // The deployment is being created. + CREATING = 1; + + // The deployment is healthy. + ACTIVE = 2; + + // The deployment is being updated. + UPDATING = 3; + + // The deployment is being deleted. + DELETING = 4; + + // The deployment has encountered an unexpected error. + FAILED = 5; + + // The deployment is no longer being actively reconciled. + // This may be the result of recovering the project after deletion. + SUSPENDED = 6; + + // The deployment has been deleted. + DELETED = 7; + } + + // Possible errors that can occur with deployments. + enum ErrorCode { + // No error code was specified. + ERROR_CODE_UNSPECIFIED = 0; + + // The revision failed. See Revision for more details. + REVISION_FAILED = 1; + + // Cloud Build failed due to a permission issue. + CLOUD_BUILD_PERMISSION_DENIED = 3; + + // Cloud Build job associated with a deployment deletion could not be + // started. + DELETE_BUILD_API_FAILED = 5; + + // Cloud Build job associated with a deployment deletion was started but + // failed. + DELETE_BUILD_RUN_FAILED = 6; + + // Cloud Storage bucket creation failed due to a permission issue. + BUCKET_CREATION_PERMISSION_DENIED = 7; + + // Cloud Storage bucket creation failed due to an issue unrelated to + // permissions. + BUCKET_CREATION_FAILED = 8; + + // Failed to import values from an external source. + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 10; + } + + // Possible lock states of a deployment. + enum LockState { + // The default value. This value is used if the lock state is omitted. + LOCK_STATE_UNSPECIFIED = 0; + + // The deployment is locked. + LOCKED = 1; + + // The deployment is unlocked. + UNLOCKED = 2; + + // The deployment is being locked. + LOCKING = 3; + + // The deployment is being unlocked. + UNLOCKING = 4; + + // The deployment has failed to lock. + LOCK_FAILED = 5; + + // The deployment has failed to unlock. + UNLOCK_FAILED = 6; + } + + // Blueprint to deploy. + oneof blueprint { + // A blueprint described using Terraform's HashiCorp Configuration Language + // as a root module. + TerraformBlueprint terraform_blueprint = 6; + } + + // Identifier. Resource name of the deployment. + // Format: `projects/{project}/locations/{location}/deployments/{deployment}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Time when the deployment was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the deployment was last modified. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined metadata for the deployment. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the deployment. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Revision name that was most recently applied. + // Format: `projects/{project}/locations/{location}/deployments/{deployment}/ + // revisions/{revision}` + string latest_revision = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information regarding the current state. + string state_detail = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error code describing errors that may have occurred. + ErrorCode error_code = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of artifacts from a DeleteDeployment operation. + ApplyResults delete_results = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud Build instance UUID associated with deleting this + // deployment. + string delete_build = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of Cloud Build logs in Google Cloud Storage, + // populated when deleting this deployment. Format: `gs://{bucket}/{object}`. + string delete_logs = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Errors encountered when deleting this deployment. + // Errors are truncated to 10 entries, see `delete_results` and `error_logs` + // for full details. + repeated TerraformError tf_errors = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of Terraform error logs in Google Cloud Storage. + // Format: `gs://{bucket}/{object}`. + string error_logs = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined location of Cloud Build logs and artifacts in Google + // Cloud Storage. Format: `gs://{bucket}/{folder}` + // + // A default bucket will be bootstrapped if the field is not set or empty. + // Default bucket format: `gs://--blueprint-config` + // Constraints: + // - The bucket needs to be in the same project as the deployment + // - The path cannot be within the path of `gcs_source` + // - The field cannot be updated, including changing its presence + optional string artifacts_gcs_bucket = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. User-specified Service Account (SA) credentials to be used when + // actuating resources. + // Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` + optional string service_account = 16 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; + + // By default, Infra Manager will return a failure when + // Terraform encounters a 409 code (resource conflict error) during actuation. + // If this flag is set to true, Infra Manager will instead + // attempt to automatically import the resource into the Terraform state (for + // supported resource types) and continue actuation. + // + // Not all resource types are supported, refer to documentation. + optional bool import_existing_resources = 17; + + // Optional. The user-specified Cloud Build worker pool resource in which the + // Cloud Build job will execute. Format: + // `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. + // If this field is unspecified, the default Cloud Build worker pool will be + // used. + optional string worker_pool = 19 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; + + // Output only. Current lock state of the deployment. + LockState lock_state = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The user-specified Terraform version constraint. + // Example: "=1.3.10". + optional string tf_version_constraint = 21 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The current Terraform version set on the deployment. + // It is in the format of "Major.Minor.Patch", for example, "1.3.10". + string tf_version = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Input to control quota checks for resources in terraform + // configuration files. There are limited resources on which quota validation + // applies. + QuotaValidation quota_validation = 23 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Arbitrary key-value metadata storage e.g. to help client tools + // identify deployments during automation. See + // https://google.aip.dev/148#annotations for details on format and size + // limitations. + map annotations = 24 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field specifies the provider configurations. + ProviderConfig provider_config = 25 [(google.api.field_behavior) = OPTIONAL]; +} + +// TerraformBlueprint describes the source of a Terraform root module which +// describes the resources and configs to be deployed. +message TerraformBlueprint { + // Location of the source configs. + // Required. + oneof source { + // URI of an object in Google Cloud Storage. + // Format: `gs://{bucket}/{object}` + // + // URI may also specify an object version for zipped objects. + // Format: `gs://{bucket}/{object}#{version}` + string gcs_source = 1; + + // URI of a public Git repo. + GitSource git_source = 2; + } + + // Optional. Input variable values for the Terraform blueprint. + map input_values = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A Terraform input variable. +message TerraformVariable { + // Optional. Input variable value. + google.protobuf.Value input_value = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Outputs and artifacts from applying a deployment. +message ApplyResults { + // Location of a blueprint copy and other manifests in Google Cloud Storage. + // Format: `gs://{bucket}/{object}` + string content = 1; + + // Location of artifacts (e.g. logs) in Google Cloud Storage. + // Format: `gs://{bucket}/{object}` + string artifacts = 2; + + // Map of output name to output info. + map outputs = 3; +} + +// Describes a Terraform output. +message TerraformOutput { + // Identifies whether Terraform has set this output as a potential + // sensitive value. + bool sensitive = 1; + + // Value of output. + google.protobuf.Value value = 2; +} + +message ListDeploymentsRequest { + // Required. The parent in whose context the Deployments are listed. The + // parent value is in the format: + // 'projects/{project_id}/locations/{location}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // When requesting a page of resources, 'page_size' specifies number of + // resources to return. If unspecified, at most 500 will be returned. The + // maximum value is 1000. + int32 page_size = 2; + + // Token returned by previous call to 'ListDeployments' which specifies the + // position in the list from where to continue listing the resources. + string page_token = 3; + + // Lists the Deployments that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form '{field} {operator} {value}' where operators: '<', '>', + // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + // operator which is roughly synonymous with equality). {field} can refer to a + // proto or JSON field, or a synthetic field. Field names can be camelCase or + // snake_case. + // + // Examples: + // - Filter by name: + // name = "projects/foo/locations/us-central1/deployments/bar + // + // - Filter by labels: + // - Resources that have a key called 'foo' + // labels.foo:* + // - Resources that have a key called 'foo' whose value is 'bar' + // labels.foo = bar + // + // - Filter by state: + // - Deployments in CREATING state. + // state=CREATING + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +message ListDeploymentsResponse { + // List of [Deployment][google.cloud.config.v1.Deployment]s. + repeated Deployment deployments = 1; + + // Token to be supplied to the next ListDeployments request via `page_token` + // to obtain the next set of results. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +message GetDeploymentRequest { + // Required. The name of the deployment. Format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; +} + +// A request to list Revisions passed to a 'ListRevisions' call. +message ListRevisionsRequest { + // Required. The parent in whose context the Revisions are listed. The parent + // value is in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // When requesting a page of resources, `page_size` specifies number of + // resources to return. If unspecified, at most 500 will be returned. The + // maximum value is 1000. + int32 page_size = 2; + + // Token returned by previous call to 'ListRevisions' which specifies the + // position in the list from where to continue listing the resources. + string page_token = 3; + + // Lists the Revisions that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form '{field} {operator} {value}' where operators: '<', '>', + // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + // operator which is roughly synonymous with equality). {field} can refer to a + // proto or JSON field, or a synthetic field. Field names can be camelCase or + // snake_case. + // + // Examples: + // - Filter by name: + // name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar + // + // - Filter by labels: + // - Resources that have a key called 'foo' + // labels.foo:* + // - Resources that have a key called 'foo' whose value is 'bar' + // labels.foo = bar + // + // - Filter by state: + // - Revisions in CREATING state. + // state=CREATING + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +// A response to a 'ListRevisions' call. Contains a list of Revisions. +message ListRevisionsResponse { + // List of [Revision][google.cloud.config.v1.Revision]s. + repeated Revision revisions = 1; + + // A token to request the next page of resources from the 'ListRevisions' + // method. The value of an empty string means that there are no more resources + // to return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// A request to get a Revision from a 'GetRevision' call. +message GetRevisionRequest { + // Required. The name of the Revision in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } + ]; +} + +message CreateDeploymentRequest { + // Required. The parent in whose context the Deployment is created. The parent + // value is in the format: 'projects/{project_id}/locations/{location}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The Deployment ID. + string deployment_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. [Deployment][google.cloud.config.v1.Deployment] resource to be + // created. + Deployment deployment = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +message UpdateDeploymentRequest { + // Optional. Field mask used to specify the fields to be overwritten in the + // Deployment resource by the update. + // + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. [Deployment][google.cloud.config.v1.Deployment] to update. + // + // The deployment's `name` field is used to identify the resource to be + // updated. Format: + // `projects/{project}/locations/{location}/deployments/{deployment}` + Deployment deployment = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +message DeleteDeploymentRequest { + // Policy on how resources actuated by the deployment should be deleted. + enum DeletePolicy { + // Unspecified policy, resources will be deleted. + DELETE_POLICY_UNSPECIFIED = 0; + + // Deletes resources actuated by the deployment. + DELETE = 1; + + // Abandons resources and only deletes the deployment and its metadata. + ABANDON = 2; + } + + // Required. The name of the Deployment in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, any revisions for this deployment will also be + // deleted. (Otherwise, the request will only work if the deployment has no + // revisions.) + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Policy on how resources actuated by the deployment should be + // deleted. If unspecified, the default behavior is to delete the underlying + // resources. + DeletePolicy delete_policy = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Ephemeral metadata about the state of an operation for a particular + // resource. + oneof resource_metadata { + // Output only. Metadata about the deployment operation state. + DeploymentOperationMetadata deployment_metadata = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata about the preview operation state. + PreviewOperationMetadata preview_metadata = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Time when the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation of the + // operation. Operations that have successfully been cancelled have + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A child resource of a Deployment generated by a 'CreateDeployment' or +// 'UpdateDeployment' call. Each Revision contains metadata pertaining to a +// snapshot of a particular Deployment. +message Revision { + option (google.api.resource) = { + type: "config.googleapis.com/Revision" + pattern: "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}" + }; + + // Actions that generate a revision. + enum Action { + // The default value. This value is used if the action is omitted. + ACTION_UNSPECIFIED = 0; + + // The revision was generated by creating a deployment. + CREATE = 1; + + // The revision was generated by updating a deployment. + UPDATE = 2; + + // The revision was deleted. + DELETE = 3; + } + + // Possible states of a revision. + enum State { + // The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0; + + // The revision is being applied. + APPLYING = 1; + + // The revision was applied successfully. + APPLIED = 2; + + // The revision could not be applied successfully. + FAILED = 3; + } + + // Possible errors if Revision could not be created or updated successfully. + enum ErrorCode { + // No error code was specified. + ERROR_CODE_UNSPECIFIED = 0; + + // Cloud Build failed due to a permission issue. + CLOUD_BUILD_PERMISSION_DENIED = 1; + + // Cloud Build job associated with creating or updating a deployment could + // not be started. + APPLY_BUILD_API_FAILED = 4; + + // Cloud Build job associated with creating or updating a deployment was + // started but failed. + APPLY_BUILD_RUN_FAILED = 5; + + // quota validation failed for one or more resources in terraform + // configuration files. + QUOTA_VALIDATION_FAILED = 7; + + // Failed to import values from an external source. + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 8; + } + + // Blueprint that was deployed. + oneof blueprint { + // Output only. A blueprint described using Terraform's HashiCorp + // Configuration Language as a root module. + TerraformBlueprint terraform_blueprint = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Revision name. Format: + // `projects/{project}/locations/{location}/deployments/{deployment}/ + // revisions/{revision}` + string name = 1; + + // Output only. Time when the revision was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the revision was last modified. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The action which created this revision + Action action = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the revision. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Outputs and artifacts from applying a deployment. + ApplyResults apply_results = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional info regarding the current state. + string state_detail = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Code describing any errors that may have occurred. + ErrorCode error_code = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud Build instance UUID associated with this revision. + string build = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of Revision operation logs in + // `gs://{bucket}/{object}` format. + string logs = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Errors encountered when creating or updating this deployment. + // Errors are truncated to 10 entries, see `delete_results` and `error_logs` + // for full details. + repeated TerraformError tf_errors = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of Terraform error logs in Google Cloud Storage. + // Format: `gs://{bucket}/{object}`. + string error_logs = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. User-specified Service Account (SA) to be used as credential + // to manage resources. Format: + // `projects/{projectID}/serviceAccounts/{serviceAccount}` + string service_account = 14 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; + + // Output only. By default, Infra Manager will return a failure when + // Terraform encounters a 409 code (resource conflict error) during actuation. + // If this flag is set to true, Infra Manager will instead + // attempt to automatically import the resource into the Terraform state (for + // supported resource types) and continue actuation. + // + // Not all resource types are supported, refer to documentation. + bool import_existing_resources = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The user-specified Cloud Build worker pool resource in which + // the Cloud Build job will execute. Format: + // `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. + // If this field is unspecified, the default Cloud Build worker pool will be + // used. + string worker_pool = 17 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; + + // Output only. The user-specified Terraform version constraint. + // Example: "=1.3.10". + string tf_version_constraint = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The version of Terraform used to create the Revision. + // It is in the format of "Major.Minor.Patch", for example, "1.3.10". + string tf_version = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud Storage path containing quota validation results. This + // field is set when a user sets Deployment.quota_validation field to ENABLED + // or ENFORCED. Format: `gs://{bucket}/{object}`. + string quota_validation_results = 29 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Input to control quota checks for resources in terraform + // configuration files. There are limited resources on which quota validation + // applies. + QuotaValidation quota_validation = 20 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. This field specifies the provider configurations. + ProviderConfig provider_config = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Errors encountered during actuation using Terraform +message TerraformError { + // Address of the resource associated with the error, + // e.g. `google_compute_network.vpc_network`. + string resource_address = 1; + + // HTTP response code returned from Google Cloud Platform APIs when Terraform + // fails to provision the resource. If unset or 0, no HTTP response code was + // returned by Terraform. + int32 http_response_code = 2; + + // A human-readable error description. + string error_description = 3; + + // Output only. Original error response from underlying Google API, if + // available. + google.rpc.Status error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A set of files in a Git repository. +message GitSource { + // Optional. Repository URL. + // Example: 'https://github.com/kubernetes/examples.git' + optional string repo = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Subdirectory inside the repository. + // Example: 'staging/my-package' + optional string directory = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Git reference (e.g. branch or tag). + optional string ref = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Ephemeral metadata content describing the state of a deployment operation. +message DeploymentOperationMetadata { + // The possible steps a deployment may be running. + enum DeploymentStep { + // Unspecified deployment step + DEPLOYMENT_STEP_UNSPECIFIED = 0; + + // Infra Manager is creating a Google Cloud Storage bucket to store + // artifacts and metadata about the deployment and revision + PREPARING_STORAGE_BUCKET = 1; + + // Downloading the blueprint onto the Google Cloud Storage bucket + DOWNLOADING_BLUEPRINT = 2; + + // Initializing Terraform using `terraform init` + RUNNING_TF_INIT = 3; + + // Running `terraform plan` + RUNNING_TF_PLAN = 4; + + // Actuating resources using Terraform using `terraform apply` + RUNNING_TF_APPLY = 5; + + // Destroying resources using Terraform using `terraform destroy` + RUNNING_TF_DESTROY = 6; + + // Validating the uploaded TF state file when unlocking a deployment + RUNNING_TF_VALIDATE = 7; + + // Unlocking a deployment + UNLOCKING_DEPLOYMENT = 8; + + // Operation was successful + SUCCEEDED = 9; + + // Operation failed + FAILED = 10; + + // Validating the provided repository. + VALIDATING_REPOSITORY = 11; + + // Running quota validation + RUNNING_QUOTA_VALIDATION = 12; + } + + // The current step the deployment operation is running. + DeploymentStep step = 1; + + // Outputs and artifacts from applying a deployment. + ApplyResults apply_results = 2; + + // Output only. Cloud Build instance UUID associated with this operation. + string build = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of Deployment operations logs in + // `gs://{bucket}/{object}` format. + string logs = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Resource represents a Google Cloud Platform resource actuated by IM. +// Resources are child resources of Revisions. +message Resource { + option (google.api.resource) = { + type: "config.googleapis.com/Resource" + pattern: "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}" + }; + + // Possible intent of the resource. + enum Intent { + // The default value. This value is used if the intent is omitted. + INTENT_UNSPECIFIED = 0; + + // Infra Manager will create this Resource. + CREATE = 1; + + // Infra Manager will update this Resource. + UPDATE = 2; + + // Infra Manager will delete this Resource. + DELETE = 3; + + // Infra Manager will destroy and recreate this Resource. + RECREATE = 4; + + // Infra Manager will leave this Resource untouched. + UNCHANGED = 5; + } + + // Possible states of a resource. + enum State { + // The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0; + + // Resource has been planned for reconcile. + PLANNED = 1; + + // Resource is actively reconciling into the intended state. + IN_PROGRESS = 2; + + // Resource has reconciled to intended state. + RECONCILED = 3; + + // Resource failed to reconcile. + FAILED = 4; + } + + // Output only. Resource name. + // Format: + // `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Terraform-specific info if this resource was created using + // Terraform. + ResourceTerraformInfo terraform_info = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI + // ID). CAI type format follows + // https://cloud.google.com/asset-inventory/docs/supported-asset-types + map cai_assets = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Intent of the resource. + Intent intent = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the resource. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Terraform info of a Resource. +message ResourceTerraformInfo { + // TF resource address that uniquely identifies this resource within this + // deployment. + string address = 1; + + // TF resource type + string type = 2; + + // ID attribute of the TF resource + string id = 3; +} + +// CAI info of a Resource. +message ResourceCAIInfo { + // CAI resource name in the format following + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string full_resource_name = 1; +} + +// A request to get a Resource from a 'GetResource' call. +message GetResourceRequest { + // Required. The name of the Resource in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Resource" } + ]; +} + +// A request to list Resources passed to a 'ListResources' call. +message ListResourcesRequest { + // Required. The parent in whose context the Resources are listed. The parent + // value is in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } + ]; + + // When requesting a page of resources, 'page_size' specifies number of + // resources to return. If unspecified, at most 500 will be returned. The + // maximum value is 1000. + int32 page_size = 2; + + // Token returned by previous call to 'ListResources' which specifies the + // position in the list from where to continue listing the resources. + string page_token = 3; + + // Lists the Resources that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form '{field} {operator} {value}' where operators: '<', '>', + // '<=', + // '>=', + // '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + // roughly synonymous with equality). {field} can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = + // "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +// A response to a 'ListResources' call. Contains a list of Resources. +message ListResourcesResponse { + // List of [Resources][google.cloud.config.v1.Resource]. + repeated Resource resources = 1; + + // A token to request the next page of resources from the 'ListResources' + // method. The value of an empty string means that there are no more resources + // to return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Contains info about a Terraform state file +message Statefile { + // Output only. Cloud Storage signed URI used for downloading or uploading the + // state file. + string signed_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request to export a state file passed to a 'ExportDeploymentStatefile' +// call. +message ExportDeploymentStatefileRequest { + // Required. The parent in whose context the statefile is listed. The parent + // value is in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // Optional. If this flag is set to true, the exported deployment state file + // will be the draft state. This will enable the draft file to be validated + // before copying it over to the working state on unlock. + bool draft = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to export a state file passed to a 'ExportRevisionStatefile' +// call. +message ExportRevisionStatefileRequest { + // Required. The parent in whose context the statefile is listed. The parent + // value is in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } + ]; +} + +// A request to import a state file passed to a 'ImportStatefile' call. +message ImportStatefileRequest { + // Required. The parent in whose context the statefile is listed. The parent + // value is in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // Required. Lock ID of the lock file to verify that the user who is importing + // the state file previously locked the Deployment. + int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. + bool skip_draft = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete a state file passed to a 'DeleteStatefile' call. +message DeleteStatefileRequest { + // Required. The name of the deployment in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // Required. Lock ID of the lock file to verify that the user who is deleting + // the state file previously locked the Deployment. + int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request to lock a deployment passed to a 'LockDeployment' call. +message LockDeploymentRequest { + // Required. The name of the deployment in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; +} + +// A request to unlock a state file passed to a 'UnlockDeployment' call. +message UnlockDeploymentRequest { + // Required. The name of the deployment in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // Required. Lock ID of the lock file to be unlocked. + int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request to get a state file lock info passed to a 'ExportLockInfo' call. +message ExportLockInfoRequest { + // Required. The name of the deployment in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; +} + +// Details about the lock which locked the deployment. +message LockInfo { + // Unique ID for the lock to be overridden with generation ID in the backend. + int64 lock_id = 1; + + // Terraform operation, provided by the caller. + string operation = 2; + + // Extra information to store with the lock, provided by the caller. + string info = 3; + + // user@hostname when available + string who = 4; + + // Terraform version + string version = 5; + + // Time that the lock was taken. + google.protobuf.Timestamp create_time = 6; +} + +// A preview represents a set of actions Infra Manager would perform +// to move the resources towards the desired state as specified in the +// configuration. +message Preview { + option (google.api.resource) = { + type: "config.googleapis.com/Preview" + pattern: "projects/{project}/locations/{location}/previews/{preview}" + plural: "previews" + singular: "preview" + }; + + // Possible states of a preview. + enum State { + // The default value. This value is used if the state is unknown. + STATE_UNSPECIFIED = 0; + + // The preview is being created. + CREATING = 1; + + // The preview has succeeded. + SUCCEEDED = 2; + + // The preview is being applied. + APPLYING = 3; + + // The preview is stale. A preview can become stale if a revision has been + // applied after this preview was created. + STALE = 4; + + // The preview is being deleted. + DELETING = 5; + + // The preview has encountered an unexpected error. + FAILED = 6; + + // The preview has been deleted. + DELETED = 7; + } + + // Preview mode provides options for customizing preview operations. + enum PreviewMode { + // Unspecified policy, default mode will be used. + PREVIEW_MODE_UNSPECIFIED = 0; + + // DEFAULT mode generates an execution plan for reconciling current resource + // state into expected resource state. + DEFAULT = 1; + + // DELETE mode generates as execution plan for destroying current resources. + DELETE = 2; + } + + // Possible errors that can occur with previews. + enum ErrorCode { + // No error code was specified. + ERROR_CODE_UNSPECIFIED = 0; + + // Cloud Build failed due to a permissions issue. + CLOUD_BUILD_PERMISSION_DENIED = 1; + + // Cloud Storage bucket failed to create due to a permissions issue. + BUCKET_CREATION_PERMISSION_DENIED = 2; + + // Cloud Storage bucket failed for a non-permissions-related issue. + BUCKET_CREATION_FAILED = 3; + + // Acquiring lock on provided deployment reference failed. + DEPLOYMENT_LOCK_ACQUIRE_FAILED = 4; + + // Preview encountered an error when trying to access Cloud Build API. + PREVIEW_BUILD_API_FAILED = 5; + + // Preview created a build but build failed and logs were generated. + PREVIEW_BUILD_RUN_FAILED = 6; + + // Failed to import values from an external source. + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 7; + } + + // Blueprint to preview. + oneof blueprint { + // The terraform blueprint to preview. + TerraformBlueprint terraform_blueprint = 6; + } + + // Identifier. Resource name of the preview. Resource name can be user + // provided or server generated ID if unspecified. Format: + // `projects/{project}/locations/{location}/previews/{preview}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Time the preview was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels for the preview. + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the preview. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Optional deployment reference. If specified, the preview will be + // performed using the provided deployment's current state and use any + // relevant fields from the deployment unless explicitly specified in the + // preview create request. + string deployment = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // Optional. Current mode of preview. + PreviewMode preview_mode = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Required. User-specified Service Account (SA) credentials to be used when + // previewing resources. + // Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` + string service_account = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; + + // Optional. User-defined location of Cloud Build logs, artifacts, and + // in Google Cloud Storage. + // Format: `gs://{bucket}/{folder}` + // A default bucket will be bootstrapped if the field is not set or empty + // Default Bucket Format: `gs://--blueprint-config` + // Constraints: + // - The bucket needs to be in the same project as the deployment + // - The path cannot be within the path of `gcs_source` + // If omitted and deployment resource ref provided has artifacts_gcs_bucket + // defined, that artifact bucket is used. + optional string artifacts_gcs_bucket = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The user-specified Worker Pool resource in which the Cloud Build + // job will execute. Format + // projects/{project}/locations/{location}/workerPools/{workerPoolId} If this + // field is unspecified, the default Cloud Build worker pool will be used. If + // omitted and deployment resource ref provided has worker_pool defined, that + // worker pool is used. + optional string worker_pool = 9 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; + + // Output only. Code describing any errors that may have occurred. + ErrorCode error_code = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information regarding the current state. + google.rpc.Status error_status = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud Build instance UUID associated with this preview. + string build = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Summary of errors encountered during Terraform preview. + // It has a size limit of 10, i.e. only top 10 errors will be summarized here. + repeated TerraformError tf_errors = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Link to tf-error.ndjson file, which contains the full list of + // the errors encountered during a Terraform preview. + // Format: `gs://{bucket}/{object}`. + string error_logs = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Artifacts from preview. + PreviewArtifacts preview_artifacts = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of preview logs in `gs://{bucket}/{object}` format. + string logs = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current Terraform version set on the preview. + // It is in the format of "Major.Minor.Patch", for example, "1.3.10". + string tf_version = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The user-specified Terraform version constraint. + // Example: "=1.3.10". + optional string tf_version_constraint = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Arbitrary key-value metadata storage e.g. to help client tools + // identify preview during automation. See + // https://google.aip.dev/148#annotations for details on format and size + // limitations. + map annotations = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field specifies the provider configurations. + ProviderConfig provider_config = 21 [(google.api.field_behavior) = OPTIONAL]; +} + +// Ephemeral metadata content describing the state of a preview operation. +message PreviewOperationMetadata { + // The possible steps a preview may be running. + enum PreviewStep { + // Unspecified preview step. + PREVIEW_STEP_UNSPECIFIED = 0; + + // Infra Manager is creating a Google Cloud Storage bucket to store + // artifacts and metadata about the preview. + PREPARING_STORAGE_BUCKET = 1; + + // Downloading the blueprint onto the Google Cloud Storage bucket. + DOWNLOADING_BLUEPRINT = 2; + + // Initializing Terraform using `terraform init`. + RUNNING_TF_INIT = 3; + + // Running `terraform plan`. + RUNNING_TF_PLAN = 4; + + // Fetching a deployment. + FETCHING_DEPLOYMENT = 5; + + // Locking a deployment. + LOCKING_DEPLOYMENT = 6; + + // Unlocking a deployment. + UNLOCKING_DEPLOYMENT = 7; + + // Operation was successful. + SUCCEEDED = 8; + + // Operation failed. + FAILED = 9; + + // Validating the provided repository. + VALIDATING_REPOSITORY = 10; + } + + // The current step the preview operation is running. + PreviewStep step = 1; + + // Artifacts from preview. + PreviewArtifacts preview_artifacts = 2; + + // Output only. Location of preview logs in `gs://{bucket}/{object}` format. + string logs = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud Build instance UUID associated with this preview. + string build = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Artifacts created by preview. +message PreviewArtifacts { + // Output only. Location of a blueprint copy and other content in Google Cloud + // Storage. Format: `gs://{bucket}/{object}` + string content = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of artifacts in Google Cloud Storage. + // Format: `gs://{bucket}/{object}` + string artifacts = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request to create a preview. +message CreatePreviewRequest { + // Required. The parent in whose context the Preview is created. The parent + // value is in the format: 'projects/{project_id}/locations/{location}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The preview ID. + string preview_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. [Preview][google.cloud.config.v1.Preview] resource to be created. + Preview preview = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// A request to get details about a preview. +message GetPreviewRequest { + // Required. The name of the preview. Format: + // 'projects/{project_id}/locations/{location}/previews/{preview}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } + ]; +} + +// A request to list all previews for a given project and location. +message ListPreviewsRequest { + // Required. The parent in whose context the Previews are listed. The parent + // value is in the format: 'projects/{project_id}/locations/{location}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. When requesting a page of resources, 'page_size' specifies number + // of resources to return. If unspecified, at most 500 will be returned. The + // maximum value is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to 'ListDeployments' which + // specifies the position in the list from where to continue listing the + // resources. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Lists the Deployments that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form '{field} {operator} {value}' where operators: '<', '>', + // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + // operator which is roughly synonymous with equality). {field} can refer to a + // proto or JSON field, or a synthetic field. Field names can be camelCase or + // snake_case. + // + // Examples: + // - Filter by name: + // name = "projects/foo/locations/us-central1/deployments/bar + // + // - Filter by labels: + // - Resources that have a key called 'foo' + // labels.foo:* + // - Resources that have a key called 'foo' whose value is 'bar' + // labels.foo = bar + // + // - Filter by state: + // - Deployments in CREATING state. + // state=CREATING + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to use to sort the list. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response to a `ListPreviews` call. Contains a list of Previews. +message ListPreviewsResponse { + // List of [Previews][google.cloud.config.v1.Preview]. + repeated Preview previews = 1; + + // Token to be supplied to the next ListPreviews request via `page_token` + // to obtain the next set of results. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// A request to delete a preview. +message DeletePreviewRequest { + // Required. The name of the Preview in the format: + // 'projects/{project_id}/locations/{location}/previews/{preview}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// A request to export preview results. +message ExportPreviewResultRequest { + // Required. The preview whose results should be exported. The preview value + // is in the format: + // 'projects/{project_id}/locations/{location}/previews/{preview}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } + ]; +} + +// A response to `ExportPreviewResult` call. Contains preview results. +message ExportPreviewResultResponse { + // Output only. Signed URLs for accessing the plan files. + PreviewResult result = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains a signed Cloud Storage URLs. +message PreviewResult { + // Output only. Plan binary signed URL + string binary_signed_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Plan JSON signed URL + string json_signed_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for the GetTerraformVersion method. +message GetTerraformVersionRequest { + // Required. The name of the TerraformVersion. Format: + // 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/TerraformVersion" + } + ]; +} + +// The request message for the ListTerraformVersions method. +message ListTerraformVersionsRequest { + // Required. The parent in whose context the TerraformVersions are listed. The + // parent value is in the format: + // 'projects/{project_id}/locations/{location}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. When requesting a page of terraform versions, 'page_size' + // specifies number of terraform versions to return. If unspecified, at most + // 500 will be returned. The maximum value is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to 'ListTerraformVersions' which + // specifies the position in the list from where to continue listing the + // terraform versions. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Lists the TerraformVersions that match the filter expression. A + // filter expression filters the resources listed in the response. The + // expression must be of the form '{field} {operator} {value}' where + // operators: '<', '>', + // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + // operator which is roughly synonymous with equality). {field} can refer to a + // proto or JSON field, or a synthetic field. Field names can be camelCase or + // snake_case. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to use to sort the list. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for the `ListTerraformVersions` method. +message ListTerraformVersionsResponse { + // List of [TerraformVersion][google.cloud.config.v1.TerraformVersion]s. + repeated TerraformVersion terraform_versions = 1; + + // Token to be supplied to the next ListTerraformVersions request via + // `page_token` to obtain the next set of results. + string next_page_token = 2; + + // Unreachable resources, if any. + repeated string unreachable = 3; +} + +// A TerraformVersion represents the support state the corresponding +// Terraform version. +message TerraformVersion { + option (google.api.resource) = { + type: "config.googleapis.com/TerraformVersion" + pattern: "projects/{project}/locations/{location}/terraformVersions/{terraform_version}" + plural: "terraformVersions" + singular: "terraformVersion" + }; + + // Possible states of a TerraformVersion. + enum State { + // The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0; + + // The version is actively supported. + ACTIVE = 1; + + // The version is deprecated. + DEPRECATED = 2; + + // The version is obsolete. + OBSOLETE = 3; + } + + // Identifier. The version name is in the format: + // 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The state of the version, ACTIVE, DEPRECATED or OBSOLETE. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the version is supported. + google.protobuf.Timestamp support_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the version is deprecated. + optional google.protobuf.Timestamp deprecate_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the version is obsolete. + optional google.protobuf.Timestamp obsolete_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Terraform info of a ResourceChange. +message ResourceChangeTerraformInfo { + // Output only. TF resource address that uniquely identifies the resource. + string address = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. TF resource type. + string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. TF resource name. + string resource_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. TF resource provider. + string provider = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. TF resource actions. + repeated string actions = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource change represents a change to a resource in the state file. +message ResourceChange { + option (google.api.resource) = { + type: "config.googleapis.com/ResourceChange" + pattern: "projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}" + plural: "resourceChanges" + singular: "resourceChange" + }; + + // Possible intent of the resource change. + enum Intent { + // The default value. + INTENT_UNSPECIFIED = 0; + + // The resource will be created. + CREATE = 1; + + // The resource will be updated. + UPDATE = 2; + + // The resource will be deleted. + DELETE = 3; + + // The resource will be recreated. + RECREATE = 4; + + // The resource will be untouched. + UNCHANGED = 5; + } + + // Identifier. The name of the resource change. + // Format: + // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Terraform info of the resource change. + ResourceChangeTerraformInfo terraform_info = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The intent of the resource change. + Intent intent = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The property changes of the resource change. + repeated PropertyChange property_changes = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A property change represents a change to a property in the state file. +message PropertyChange { + // Output only. The path of the property change. + string path = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The paths of sensitive fields in `before`. Paths are relative + // to `path`. + repeated string before_sensitive_paths = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Representations of the object value before the actions. + google.protobuf.Value before = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The paths of sensitive fields in `after`. Paths are relative + // to `path`. + repeated string after_sensitive_paths = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Representations of the object value after the actions. + google.protobuf.Value after = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for the ListResourceChanges method. +message ListResourceChangesRequest { + // Required. The parent in whose context the ResourceChanges are listed. The + // parent value is in the format: + // 'projects/{project_id}/locations/{location}/previews/{preview}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } + ]; + + // Optional. When requesting a page of resource changes, 'page_size' specifies + // number of resource changes to return. If unspecified, at most 500 will be + // returned. The maximum value is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to 'ListResourceChanges' which + // specifies the position in the list from where to continue listing the + // resource changes. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Lists the resource changes that match the filter expression. A + // filter expression filters the resource changes listed in the response. The + // expression must be of the form '{field} {operator} {value}' where + // operators: '<', '>', + // '<=', + // '>=', + // '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + // roughly synonymous with equality). {field} can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = + // "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to use to sort the list. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response to a 'ListResourceChanges' call. Contains a list of +// ResourceChanges. +message ListResourceChangesResponse { + // List of ResourceChanges. + repeated ResourceChange resource_changes = 1; + + // A token to request the next page of resources from the + // 'ListResourceChanges' method. The value of an empty string means that + // there are no more resources to return. + string next_page_token = 2; + + // Unreachable resources, if any. + repeated string unreachable = 3; +} + +// The request message for the GetResourceChange method. +message GetResourceChangeRequest { + // Required. The name of the resource change to retrieve. + // Format: + // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/ResourceChange" + } + ]; +} + +// Terraform info of a ResourceChange. +message ResourceDriftTerraformInfo { + // Output only. The address of the drifted resource. + string address = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the drifted resource. + string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. TF resource name. + string resource_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The provider of the drifted resource. + string provider = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource drift represents a drift to a resource in the state file. +message ResourceDrift { + option (google.api.resource) = { + type: "config.googleapis.com/ResourceDrift" + pattern: "projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}" + plural: "resourceDrifts" + singular: "resourceDrift" + }; + + // Identifier. The name of the resource drift. + // Format: + // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Terraform info of the resource drift. + ResourceDriftTerraformInfo terraform_info = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The property drifts of the resource drift. + repeated PropertyDrift property_drifts = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A property drift represents a drift to a property in the state file. +message PropertyDrift { + // Output only. The path of the property drift. + string path = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The paths of sensitive fields in `before`. Paths are relative + // to `path`. + repeated string before_sensitive_paths = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Representations of the object value before the actions. + google.protobuf.Value before = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The paths of sensitive fields in `after`. Paths are relative + // to `path`. + repeated string after_sensitive_paths = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Representations of the object value after the actions. + google.protobuf.Value after = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for the ListResourceDrifts method. +message ListResourceDriftsRequest { + // Required. The parent in whose context the ResourceDrifts are listed. The + // parent value is in the format: + // 'projects/{project_id}/locations/{location}/previews/{preview}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } + ]; + + // Optional. When requesting a page of resource drifts, 'page_size' specifies + // number of resource drifts to return. If unspecified, at most 500 will be + // returned. The maximum value is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to 'ListResourceDrifts' which + // specifies the position in the list from where to continue listing the + // resource drifts. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Lists the resource drifts that match the filter expression. A + // filter expression filters the resource drifts listed in the response. The + // expression must be of the form '{field} {operator} {value}' where + // operators: '<', '>', + // '<=', + // '>=', + // '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + // roughly synonymous with equality). {field} can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = + // "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to use to sort the list. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response to a 'ListResourceDrifts' call. Contains a list of ResourceDrifts. +message ListResourceDriftsResponse { + // List of ResourceDrifts. + repeated ResourceDrift resource_drifts = 1; + + // A token to request the next page of resources from the + // 'ListResourceDrifts' method. The value of an empty string means that + // there are no more resources to return. + string next_page_token = 2; + + // Unreachable resources, if any. + repeated string unreachable = 3; +} + +// The request message for the GetResourceDrift method. +message GetResourceDriftRequest { + // Required. The name of the resource drift to retrieve. + // Format: + // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/ResourceDrift" + } + ]; +} + +// ProviderConfig contains the provider configurations. +message ProviderConfig { + // ProviderSource represents the source type of the provider. + enum ProviderSource { + // Unspecified source type, default to public sources. + PROVIDER_SOURCE_UNSPECIFIED = 0; + + // Service maintained provider source type. + SERVICE_MAINTAINED = 1; + } + + // Optional. ProviderSource specifies the source type of the provider. + optional ProviderSource source_type = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the GetAutoMigrationConfig method. +message GetAutoMigrationConfigRequest { + // Required. The name of the AutoMigrationConfig. + // Format: + // 'projects/{project_id}/locations/{location}/AutoMigrationConfig'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/AutoMigrationConfig" + } + ]; +} + +// AutoMigrationConfig contains the automigration configuration for a project. +message AutoMigrationConfig { + option (google.api.resource) = { + type: "config.googleapis.com/AutoMigrationConfig" + pattern: "projects/{project}/locations/{location}/autoMigrationConfig" + plural: "autoMigrationConfigs" + singular: "autoMigrationConfig" + }; + + // Identifier. The name of the AutoMigrationConfig. + // Format: + // 'projects/{project_id}/locations/{location}/AutoMigrationConfig'. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Time the AutoMigrationConfig was last updated. + google.protobuf.Timestamp update_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Whether the auto migration is enabled for the project. + bool auto_migration_enabled = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the UpdateAutoMigrationConfig method. +message UpdateAutoMigrationConfigRequest { + // Optional. The update mask applies to the resource. See + // [google.protobuf.FieldMask][google.protobuf.FieldMask]. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The AutoMigrationConfig to update. + AutoMigrationConfig auto_migration_config = 2 + [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/google-cloud-config/protos/protos.d.ts b/owl-bot-staging/google-cloud-config/protos/protos.d.ts new file mode 100644 index 00000000000..28500e566ce --- /dev/null +++ b/owl-bot-staging/google-cloud-config/protos/protos.d.ts @@ -0,0 +1,16568 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this 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 type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace config. */ + namespace config { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a Config */ + class Config extends $protobuf.rpc.Service { + + /** + * Constructs a new Config 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 Config 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): Config; + + /** + * Calls ListDeployments. + * @param request ListDeploymentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeploymentsResponse + */ + public listDeployments(request: google.cloud.config.v1.IListDeploymentsRequest, callback: google.cloud.config.v1.Config.ListDeploymentsCallback): void; + + /** + * Calls ListDeployments. + * @param request ListDeploymentsRequest message or plain object + * @returns Promise + */ + public listDeployments(request: google.cloud.config.v1.IListDeploymentsRequest): Promise; + + /** + * Calls GetDeployment. + * @param request GetDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Deployment + */ + public getDeployment(request: google.cloud.config.v1.IGetDeploymentRequest, callback: google.cloud.config.v1.Config.GetDeploymentCallback): void; + + /** + * Calls GetDeployment. + * @param request GetDeploymentRequest message or plain object + * @returns Promise + */ + public getDeployment(request: google.cloud.config.v1.IGetDeploymentRequest): Promise; + + /** + * Calls CreateDeployment. + * @param request CreateDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createDeployment(request: google.cloud.config.v1.ICreateDeploymentRequest, callback: google.cloud.config.v1.Config.CreateDeploymentCallback): void; + + /** + * Calls CreateDeployment. + * @param request CreateDeploymentRequest message or plain object + * @returns Promise + */ + public createDeployment(request: google.cloud.config.v1.ICreateDeploymentRequest): Promise; + + /** + * Calls UpdateDeployment. + * @param request UpdateDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDeployment(request: google.cloud.config.v1.IUpdateDeploymentRequest, callback: google.cloud.config.v1.Config.UpdateDeploymentCallback): void; + + /** + * Calls UpdateDeployment. + * @param request UpdateDeploymentRequest message or plain object + * @returns Promise + */ + public updateDeployment(request: google.cloud.config.v1.IUpdateDeploymentRequest): Promise; + + /** + * Calls DeleteDeployment. + * @param request DeleteDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteDeployment(request: google.cloud.config.v1.IDeleteDeploymentRequest, callback: google.cloud.config.v1.Config.DeleteDeploymentCallback): void; + + /** + * Calls DeleteDeployment. + * @param request DeleteDeploymentRequest message or plain object + * @returns Promise + */ + public deleteDeployment(request: google.cloud.config.v1.IDeleteDeploymentRequest): Promise; + + /** + * Calls ListRevisions. + * @param request ListRevisionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRevisionsResponse + */ + public listRevisions(request: google.cloud.config.v1.IListRevisionsRequest, callback: google.cloud.config.v1.Config.ListRevisionsCallback): void; + + /** + * Calls ListRevisions. + * @param request ListRevisionsRequest message or plain object + * @returns Promise + */ + public listRevisions(request: google.cloud.config.v1.IListRevisionsRequest): Promise; + + /** + * Calls GetRevision. + * @param request GetRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Revision + */ + public getRevision(request: google.cloud.config.v1.IGetRevisionRequest, callback: google.cloud.config.v1.Config.GetRevisionCallback): void; + + /** + * Calls GetRevision. + * @param request GetRevisionRequest message or plain object + * @returns Promise + */ + public getRevision(request: google.cloud.config.v1.IGetRevisionRequest): Promise; + + /** + * Calls GetResource. + * @param request GetResourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Resource + */ + public getResource(request: google.cloud.config.v1.IGetResourceRequest, callback: google.cloud.config.v1.Config.GetResourceCallback): void; + + /** + * Calls GetResource. + * @param request GetResourceRequest message or plain object + * @returns Promise + */ + public getResource(request: google.cloud.config.v1.IGetResourceRequest): Promise; + + /** + * Calls ListResources. + * @param request ListResourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListResourcesResponse + */ + public listResources(request: google.cloud.config.v1.IListResourcesRequest, callback: google.cloud.config.v1.Config.ListResourcesCallback): void; + + /** + * Calls ListResources. + * @param request ListResourcesRequest message or plain object + * @returns Promise + */ + public listResources(request: google.cloud.config.v1.IListResourcesRequest): Promise; + + /** + * Calls ExportDeploymentStatefile. + * @param request ExportDeploymentStatefileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Statefile + */ + public exportDeploymentStatefile(request: google.cloud.config.v1.IExportDeploymentStatefileRequest, callback: google.cloud.config.v1.Config.ExportDeploymentStatefileCallback): void; + + /** + * Calls ExportDeploymentStatefile. + * @param request ExportDeploymentStatefileRequest message or plain object + * @returns Promise + */ + public exportDeploymentStatefile(request: google.cloud.config.v1.IExportDeploymentStatefileRequest): Promise; + + /** + * Calls ExportRevisionStatefile. + * @param request ExportRevisionStatefileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Statefile + */ + public exportRevisionStatefile(request: google.cloud.config.v1.IExportRevisionStatefileRequest, callback: google.cloud.config.v1.Config.ExportRevisionStatefileCallback): void; + + /** + * Calls ExportRevisionStatefile. + * @param request ExportRevisionStatefileRequest message or plain object + * @returns Promise + */ + public exportRevisionStatefile(request: google.cloud.config.v1.IExportRevisionStatefileRequest): Promise; + + /** + * Calls ImportStatefile. + * @param request ImportStatefileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Statefile + */ + public importStatefile(request: google.cloud.config.v1.IImportStatefileRequest, callback: google.cloud.config.v1.Config.ImportStatefileCallback): void; + + /** + * Calls ImportStatefile. + * @param request ImportStatefileRequest message or plain object + * @returns Promise + */ + public importStatefile(request: google.cloud.config.v1.IImportStatefileRequest): Promise; + + /** + * Calls DeleteStatefile. + * @param request DeleteStatefileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteStatefile(request: google.cloud.config.v1.IDeleteStatefileRequest, callback: google.cloud.config.v1.Config.DeleteStatefileCallback): void; + + /** + * Calls DeleteStatefile. + * @param request DeleteStatefileRequest message or plain object + * @returns Promise + */ + public deleteStatefile(request: google.cloud.config.v1.IDeleteStatefileRequest): Promise; + + /** + * Calls LockDeployment. + * @param request LockDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public lockDeployment(request: google.cloud.config.v1.ILockDeploymentRequest, callback: google.cloud.config.v1.Config.LockDeploymentCallback): void; + + /** + * Calls LockDeployment. + * @param request LockDeploymentRequest message or plain object + * @returns Promise + */ + public lockDeployment(request: google.cloud.config.v1.ILockDeploymentRequest): Promise; + + /** + * Calls UnlockDeployment. + * @param request UnlockDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public unlockDeployment(request: google.cloud.config.v1.IUnlockDeploymentRequest, callback: google.cloud.config.v1.Config.UnlockDeploymentCallback): void; + + /** + * Calls UnlockDeployment. + * @param request UnlockDeploymentRequest message or plain object + * @returns Promise + */ + public unlockDeployment(request: google.cloud.config.v1.IUnlockDeploymentRequest): Promise; + + /** + * Calls ExportLockInfo. + * @param request ExportLockInfoRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LockInfo + */ + public exportLockInfo(request: google.cloud.config.v1.IExportLockInfoRequest, callback: google.cloud.config.v1.Config.ExportLockInfoCallback): void; + + /** + * Calls ExportLockInfo. + * @param request ExportLockInfoRequest message or plain object + * @returns Promise + */ + public exportLockInfo(request: google.cloud.config.v1.IExportLockInfoRequest): Promise; + + /** + * Calls CreatePreview. + * @param request CreatePreviewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createPreview(request: google.cloud.config.v1.ICreatePreviewRequest, callback: google.cloud.config.v1.Config.CreatePreviewCallback): void; + + /** + * Calls CreatePreview. + * @param request CreatePreviewRequest message or plain object + * @returns Promise + */ + public createPreview(request: google.cloud.config.v1.ICreatePreviewRequest): Promise; + + /** + * Calls GetPreview. + * @param request GetPreviewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Preview + */ + public getPreview(request: google.cloud.config.v1.IGetPreviewRequest, callback: google.cloud.config.v1.Config.GetPreviewCallback): void; + + /** + * Calls GetPreview. + * @param request GetPreviewRequest message or plain object + * @returns Promise + */ + public getPreview(request: google.cloud.config.v1.IGetPreviewRequest): Promise; + + /** + * Calls ListPreviews. + * @param request ListPreviewsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPreviewsResponse + */ + public listPreviews(request: google.cloud.config.v1.IListPreviewsRequest, callback: google.cloud.config.v1.Config.ListPreviewsCallback): void; + + /** + * Calls ListPreviews. + * @param request ListPreviewsRequest message or plain object + * @returns Promise + */ + public listPreviews(request: google.cloud.config.v1.IListPreviewsRequest): Promise; + + /** + * Calls DeletePreview. + * @param request DeletePreviewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deletePreview(request: google.cloud.config.v1.IDeletePreviewRequest, callback: google.cloud.config.v1.Config.DeletePreviewCallback): void; + + /** + * Calls DeletePreview. + * @param request DeletePreviewRequest message or plain object + * @returns Promise + */ + public deletePreview(request: google.cloud.config.v1.IDeletePreviewRequest): Promise; + + /** + * Calls ExportPreviewResult. + * @param request ExportPreviewResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExportPreviewResultResponse + */ + public exportPreviewResult(request: google.cloud.config.v1.IExportPreviewResultRequest, callback: google.cloud.config.v1.Config.ExportPreviewResultCallback): void; + + /** + * Calls ExportPreviewResult. + * @param request ExportPreviewResultRequest message or plain object + * @returns Promise + */ + public exportPreviewResult(request: google.cloud.config.v1.IExportPreviewResultRequest): Promise; + + /** + * Calls ListTerraformVersions. + * @param request ListTerraformVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTerraformVersionsResponse + */ + public listTerraformVersions(request: google.cloud.config.v1.IListTerraformVersionsRequest, callback: google.cloud.config.v1.Config.ListTerraformVersionsCallback): void; + + /** + * Calls ListTerraformVersions. + * @param request ListTerraformVersionsRequest message or plain object + * @returns Promise + */ + public listTerraformVersions(request: google.cloud.config.v1.IListTerraformVersionsRequest): Promise; + + /** + * Calls GetTerraformVersion. + * @param request GetTerraformVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TerraformVersion + */ + public getTerraformVersion(request: google.cloud.config.v1.IGetTerraformVersionRequest, callback: google.cloud.config.v1.Config.GetTerraformVersionCallback): void; + + /** + * Calls GetTerraformVersion. + * @param request GetTerraformVersionRequest message or plain object + * @returns Promise + */ + public getTerraformVersion(request: google.cloud.config.v1.IGetTerraformVersionRequest): Promise; + + /** + * Calls ListResourceChanges. + * @param request ListResourceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListResourceChangesResponse + */ + public listResourceChanges(request: google.cloud.config.v1.IListResourceChangesRequest, callback: google.cloud.config.v1.Config.ListResourceChangesCallback): void; + + /** + * Calls ListResourceChanges. + * @param request ListResourceChangesRequest message or plain object + * @returns Promise + */ + public listResourceChanges(request: google.cloud.config.v1.IListResourceChangesRequest): Promise; + + /** + * Calls GetResourceChange. + * @param request GetResourceChangeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ResourceChange + */ + public getResourceChange(request: google.cloud.config.v1.IGetResourceChangeRequest, callback: google.cloud.config.v1.Config.GetResourceChangeCallback): void; + + /** + * Calls GetResourceChange. + * @param request GetResourceChangeRequest message or plain object + * @returns Promise + */ + public getResourceChange(request: google.cloud.config.v1.IGetResourceChangeRequest): Promise; + + /** + * Calls ListResourceDrifts. + * @param request ListResourceDriftsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListResourceDriftsResponse + */ + public listResourceDrifts(request: google.cloud.config.v1.IListResourceDriftsRequest, callback: google.cloud.config.v1.Config.ListResourceDriftsCallback): void; + + /** + * Calls ListResourceDrifts. + * @param request ListResourceDriftsRequest message or plain object + * @returns Promise + */ + public listResourceDrifts(request: google.cloud.config.v1.IListResourceDriftsRequest): Promise; + + /** + * Calls GetResourceDrift. + * @param request GetResourceDriftRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ResourceDrift + */ + public getResourceDrift(request: google.cloud.config.v1.IGetResourceDriftRequest, callback: google.cloud.config.v1.Config.GetResourceDriftCallback): void; + + /** + * Calls GetResourceDrift. + * @param request GetResourceDriftRequest message or plain object + * @returns Promise + */ + public getResourceDrift(request: google.cloud.config.v1.IGetResourceDriftRequest): Promise; + + /** + * Calls GetAutoMigrationConfig. + * @param request GetAutoMigrationConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AutoMigrationConfig + */ + public getAutoMigrationConfig(request: google.cloud.config.v1.IGetAutoMigrationConfigRequest, callback: google.cloud.config.v1.Config.GetAutoMigrationConfigCallback): void; + + /** + * Calls GetAutoMigrationConfig. + * @param request GetAutoMigrationConfigRequest message or plain object + * @returns Promise + */ + public getAutoMigrationConfig(request: google.cloud.config.v1.IGetAutoMigrationConfigRequest): Promise; + + /** + * Calls UpdateAutoMigrationConfig. + * @param request UpdateAutoMigrationConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAutoMigrationConfig(request: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, callback: google.cloud.config.v1.Config.UpdateAutoMigrationConfigCallback): void; + + /** + * Calls UpdateAutoMigrationConfig. + * @param request UpdateAutoMigrationConfigRequest message or plain object + * @returns Promise + */ + public updateAutoMigrationConfig(request: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest): Promise; + } + + namespace Config { + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listDeployments}. + * @param error Error, if any + * @param [response] ListDeploymentsResponse + */ + type ListDeploymentsCallback = (error: (Error|null), response?: google.cloud.config.v1.ListDeploymentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getDeployment}. + * @param error Error, if any + * @param [response] Deployment + */ + type GetDeploymentCallback = (error: (Error|null), response?: google.cloud.config.v1.Deployment) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|createDeployment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|updateDeployment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|deleteDeployment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listRevisions}. + * @param error Error, if any + * @param [response] ListRevisionsResponse + */ + type ListRevisionsCallback = (error: (Error|null), response?: google.cloud.config.v1.ListRevisionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getRevision}. + * @param error Error, if any + * @param [response] Revision + */ + type GetRevisionCallback = (error: (Error|null), response?: google.cloud.config.v1.Revision) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getResource}. + * @param error Error, if any + * @param [response] Resource + */ + type GetResourceCallback = (error: (Error|null), response?: google.cloud.config.v1.Resource) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listResources}. + * @param error Error, if any + * @param [response] ListResourcesResponse + */ + type ListResourcesCallback = (error: (Error|null), response?: google.cloud.config.v1.ListResourcesResponse) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|exportDeploymentStatefile}. + * @param error Error, if any + * @param [response] Statefile + */ + type ExportDeploymentStatefileCallback = (error: (Error|null), response?: google.cloud.config.v1.Statefile) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|exportRevisionStatefile}. + * @param error Error, if any + * @param [response] Statefile + */ + type ExportRevisionStatefileCallback = (error: (Error|null), response?: google.cloud.config.v1.Statefile) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|importStatefile}. + * @param error Error, if any + * @param [response] Statefile + */ + type ImportStatefileCallback = (error: (Error|null), response?: google.cloud.config.v1.Statefile) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|deleteStatefile}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteStatefileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|lockDeployment}. + * @param error Error, if any + * @param [response] Operation + */ + type LockDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|unlockDeployment}. + * @param error Error, if any + * @param [response] Operation + */ + type UnlockDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|exportLockInfo}. + * @param error Error, if any + * @param [response] LockInfo + */ + type ExportLockInfoCallback = (error: (Error|null), response?: google.cloud.config.v1.LockInfo) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|createPreview}. + * @param error Error, if any + * @param [response] Operation + */ + type CreatePreviewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getPreview}. + * @param error Error, if any + * @param [response] Preview + */ + type GetPreviewCallback = (error: (Error|null), response?: google.cloud.config.v1.Preview) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listPreviews}. + * @param error Error, if any + * @param [response] ListPreviewsResponse + */ + type ListPreviewsCallback = (error: (Error|null), response?: google.cloud.config.v1.ListPreviewsResponse) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|deletePreview}. + * @param error Error, if any + * @param [response] Operation + */ + type DeletePreviewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|exportPreviewResult}. + * @param error Error, if any + * @param [response] ExportPreviewResultResponse + */ + type ExportPreviewResultCallback = (error: (Error|null), response?: google.cloud.config.v1.ExportPreviewResultResponse) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listTerraformVersions}. + * @param error Error, if any + * @param [response] ListTerraformVersionsResponse + */ + type ListTerraformVersionsCallback = (error: (Error|null), response?: google.cloud.config.v1.ListTerraformVersionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getTerraformVersion}. + * @param error Error, if any + * @param [response] TerraformVersion + */ + type GetTerraformVersionCallback = (error: (Error|null), response?: google.cloud.config.v1.TerraformVersion) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listResourceChanges}. + * @param error Error, if any + * @param [response] ListResourceChangesResponse + */ + type ListResourceChangesCallback = (error: (Error|null), response?: google.cloud.config.v1.ListResourceChangesResponse) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getResourceChange}. + * @param error Error, if any + * @param [response] ResourceChange + */ + type GetResourceChangeCallback = (error: (Error|null), response?: google.cloud.config.v1.ResourceChange) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listResourceDrifts}. + * @param error Error, if any + * @param [response] ListResourceDriftsResponse + */ + type ListResourceDriftsCallback = (error: (Error|null), response?: google.cloud.config.v1.ListResourceDriftsResponse) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getResourceDrift}. + * @param error Error, if any + * @param [response] ResourceDrift + */ + type GetResourceDriftCallback = (error: (Error|null), response?: google.cloud.config.v1.ResourceDrift) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getAutoMigrationConfig}. + * @param error Error, if any + * @param [response] AutoMigrationConfig + */ + type GetAutoMigrationConfigCallback = (error: (Error|null), response?: google.cloud.config.v1.AutoMigrationConfig) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|updateAutoMigrationConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAutoMigrationConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** QuotaValidation enum. */ + enum QuotaValidation { + QUOTA_VALIDATION_UNSPECIFIED = 0, + ENABLED = 1, + ENFORCED = 2 + } + + /** Properties of a Deployment. */ + interface IDeployment { + + /** Deployment terraformBlueprint */ + terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); + + /** Deployment name */ + name?: (string|null); + + /** Deployment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Deployment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Deployment labels */ + labels?: ({ [k: string]: string }|null); + + /** Deployment state */ + state?: (google.cloud.config.v1.Deployment.State|keyof typeof google.cloud.config.v1.Deployment.State|null); + + /** Deployment latestRevision */ + latestRevision?: (string|null); + + /** Deployment stateDetail */ + stateDetail?: (string|null); + + /** Deployment errorCode */ + errorCode?: (google.cloud.config.v1.Deployment.ErrorCode|keyof typeof google.cloud.config.v1.Deployment.ErrorCode|null); + + /** Deployment deleteResults */ + deleteResults?: (google.cloud.config.v1.IApplyResults|null); + + /** Deployment deleteBuild */ + deleteBuild?: (string|null); + + /** Deployment deleteLogs */ + deleteLogs?: (string|null); + + /** Deployment tfErrors */ + tfErrors?: (google.cloud.config.v1.ITerraformError[]|null); + + /** Deployment errorLogs */ + errorLogs?: (string|null); + + /** Deployment artifactsGcsBucket */ + artifactsGcsBucket?: (string|null); + + /** Deployment serviceAccount */ + serviceAccount?: (string|null); + + /** Deployment importExistingResources */ + importExistingResources?: (boolean|null); + + /** Deployment workerPool */ + workerPool?: (string|null); + + /** Deployment lockState */ + lockState?: (google.cloud.config.v1.Deployment.LockState|keyof typeof google.cloud.config.v1.Deployment.LockState|null); + + /** Deployment tfVersionConstraint */ + tfVersionConstraint?: (string|null); + + /** Deployment tfVersion */ + tfVersion?: (string|null); + + /** Deployment quotaValidation */ + quotaValidation?: (google.cloud.config.v1.QuotaValidation|keyof typeof google.cloud.config.v1.QuotaValidation|null); + + /** Deployment annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Deployment providerConfig */ + providerConfig?: (google.cloud.config.v1.IProviderConfig|null); + } + + /** Represents a Deployment. */ + class Deployment implements IDeployment { + + /** + * Constructs a new Deployment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IDeployment); + + /** Deployment terraformBlueprint. */ + public terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); + + /** Deployment name. */ + public name: string; + + /** Deployment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Deployment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Deployment labels. */ + public labels: { [k: string]: string }; + + /** Deployment state. */ + public state: (google.cloud.config.v1.Deployment.State|keyof typeof google.cloud.config.v1.Deployment.State); + + /** Deployment latestRevision. */ + public latestRevision: string; + + /** Deployment stateDetail. */ + public stateDetail: string; + + /** Deployment errorCode. */ + public errorCode: (google.cloud.config.v1.Deployment.ErrorCode|keyof typeof google.cloud.config.v1.Deployment.ErrorCode); + + /** Deployment deleteResults. */ + public deleteResults?: (google.cloud.config.v1.IApplyResults|null); + + /** Deployment deleteBuild. */ + public deleteBuild: string; + + /** Deployment deleteLogs. */ + public deleteLogs: string; + + /** Deployment tfErrors. */ + public tfErrors: google.cloud.config.v1.ITerraformError[]; + + /** Deployment errorLogs. */ + public errorLogs: string; + + /** Deployment artifactsGcsBucket. */ + public artifactsGcsBucket?: (string|null); + + /** Deployment serviceAccount. */ + public serviceAccount?: (string|null); + + /** Deployment importExistingResources. */ + public importExistingResources?: (boolean|null); + + /** Deployment workerPool. */ + public workerPool?: (string|null); + + /** Deployment lockState. */ + public lockState: (google.cloud.config.v1.Deployment.LockState|keyof typeof google.cloud.config.v1.Deployment.LockState); + + /** Deployment tfVersionConstraint. */ + public tfVersionConstraint?: (string|null); + + /** Deployment tfVersion. */ + public tfVersion: string; + + /** Deployment quotaValidation. */ + public quotaValidation: (google.cloud.config.v1.QuotaValidation|keyof typeof google.cloud.config.v1.QuotaValidation); + + /** Deployment annotations. */ + public annotations: { [k: string]: string }; + + /** Deployment providerConfig. */ + public providerConfig?: (google.cloud.config.v1.IProviderConfig|null); + + /** Deployment blueprint. */ + public blueprint?: "terraformBlueprint"; + + /** + * Creates a new Deployment instance using the specified properties. + * @param [properties] Properties to set + * @returns Deployment instance + */ + public static create(properties?: google.cloud.config.v1.IDeployment): google.cloud.config.v1.Deployment; + + /** + * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.config.v1.Deployment.verify|verify} messages. + * @param message Deployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.config.v1.Deployment.verify|verify} messages. + * @param message Deployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Deployment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Deployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.Deployment; + + /** + * Decodes a Deployment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Deployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.Deployment; + + /** + * Verifies a Deployment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Deployment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Deployment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.Deployment; + + /** + * Creates a plain object from a Deployment message. Also converts values to other types if specified. + * @param message Deployment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.Deployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Deployment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Deployment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Deployment { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + UPDATING = 3, + DELETING = 4, + FAILED = 5, + SUSPENDED = 6, + DELETED = 7 + } + + /** ErrorCode enum. */ + enum ErrorCode { + ERROR_CODE_UNSPECIFIED = 0, + REVISION_FAILED = 1, + CLOUD_BUILD_PERMISSION_DENIED = 3, + DELETE_BUILD_API_FAILED = 5, + DELETE_BUILD_RUN_FAILED = 6, + BUCKET_CREATION_PERMISSION_DENIED = 7, + BUCKET_CREATION_FAILED = 8, + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 10 + } + + /** LockState enum. */ + enum LockState { + LOCK_STATE_UNSPECIFIED = 0, + LOCKED = 1, + UNLOCKED = 2, + LOCKING = 3, + UNLOCKING = 4, + LOCK_FAILED = 5, + UNLOCK_FAILED = 6 + } + } + + /** Properties of a TerraformBlueprint. */ + interface ITerraformBlueprint { + + /** TerraformBlueprint gcsSource */ + gcsSource?: (string|null); + + /** TerraformBlueprint gitSource */ + gitSource?: (google.cloud.config.v1.IGitSource|null); + + /** TerraformBlueprint inputValues */ + inputValues?: ({ [k: string]: google.cloud.config.v1.ITerraformVariable }|null); + } + + /** Represents a TerraformBlueprint. */ + class TerraformBlueprint implements ITerraformBlueprint { + + /** + * Constructs a new TerraformBlueprint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.ITerraformBlueprint); + + /** TerraformBlueprint gcsSource. */ + public gcsSource?: (string|null); + + /** TerraformBlueprint gitSource. */ + public gitSource?: (google.cloud.config.v1.IGitSource|null); + + /** TerraformBlueprint inputValues. */ + public inputValues: { [k: string]: google.cloud.config.v1.ITerraformVariable }; + + /** TerraformBlueprint source. */ + public source?: ("gcsSource"|"gitSource"); + + /** + * Creates a new TerraformBlueprint instance using the specified properties. + * @param [properties] Properties to set + * @returns TerraformBlueprint instance + */ + public static create(properties?: google.cloud.config.v1.ITerraformBlueprint): google.cloud.config.v1.TerraformBlueprint; + + /** + * Encodes the specified TerraformBlueprint message. Does not implicitly {@link google.cloud.config.v1.TerraformBlueprint.verify|verify} messages. + * @param message TerraformBlueprint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.ITerraformBlueprint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerraformBlueprint message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformBlueprint.verify|verify} messages. + * @param message TerraformBlueprint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.ITerraformBlueprint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerraformBlueprint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerraformBlueprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.TerraformBlueprint; + + /** + * Decodes a TerraformBlueprint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerraformBlueprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.TerraformBlueprint; + + /** + * Verifies a TerraformBlueprint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerraformBlueprint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerraformBlueprint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.TerraformBlueprint; + + /** + * Creates a plain object from a TerraformBlueprint message. Also converts values to other types if specified. + * @param message TerraformBlueprint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.TerraformBlueprint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerraformBlueprint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerraformBlueprint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TerraformVariable. */ + interface ITerraformVariable { + + /** TerraformVariable inputValue */ + inputValue?: (google.protobuf.IValue|null); + } + + /** Represents a TerraformVariable. */ + class TerraformVariable implements ITerraformVariable { + + /** + * Constructs a new TerraformVariable. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.ITerraformVariable); + + /** TerraformVariable inputValue. */ + public inputValue?: (google.protobuf.IValue|null); + + /** + * Creates a new TerraformVariable instance using the specified properties. + * @param [properties] Properties to set + * @returns TerraformVariable instance + */ + public static create(properties?: google.cloud.config.v1.ITerraformVariable): google.cloud.config.v1.TerraformVariable; + + /** + * Encodes the specified TerraformVariable message. Does not implicitly {@link google.cloud.config.v1.TerraformVariable.verify|verify} messages. + * @param message TerraformVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.ITerraformVariable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerraformVariable message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformVariable.verify|verify} messages. + * @param message TerraformVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.ITerraformVariable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerraformVariable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerraformVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.TerraformVariable; + + /** + * Decodes a TerraformVariable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerraformVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.TerraformVariable; + + /** + * Verifies a TerraformVariable message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerraformVariable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerraformVariable + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.TerraformVariable; + + /** + * Creates a plain object from a TerraformVariable message. Also converts values to other types if specified. + * @param message TerraformVariable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.TerraformVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerraformVariable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerraformVariable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ApplyResults. */ + interface IApplyResults { + + /** ApplyResults content */ + content?: (string|null); + + /** ApplyResults artifacts */ + artifacts?: (string|null); + + /** ApplyResults outputs */ + outputs?: ({ [k: string]: google.cloud.config.v1.ITerraformOutput }|null); + } + + /** Represents an ApplyResults. */ + class ApplyResults implements IApplyResults { + + /** + * Constructs a new ApplyResults. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IApplyResults); + + /** ApplyResults content. */ + public content: string; + + /** ApplyResults artifacts. */ + public artifacts: string; + + /** ApplyResults outputs. */ + public outputs: { [k: string]: google.cloud.config.v1.ITerraformOutput }; + + /** + * Creates a new ApplyResults instance using the specified properties. + * @param [properties] Properties to set + * @returns ApplyResults instance + */ + public static create(properties?: google.cloud.config.v1.IApplyResults): google.cloud.config.v1.ApplyResults; + + /** + * Encodes the specified ApplyResults message. Does not implicitly {@link google.cloud.config.v1.ApplyResults.verify|verify} messages. + * @param message ApplyResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IApplyResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApplyResults message, length delimited. Does not implicitly {@link google.cloud.config.v1.ApplyResults.verify|verify} messages. + * @param message ApplyResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IApplyResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApplyResults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApplyResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ApplyResults; + + /** + * Decodes an ApplyResults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApplyResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ApplyResults; + + /** + * Verifies an ApplyResults message. + * @param message Plain 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 ApplyResults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApplyResults + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ApplyResults; + + /** + * Creates a plain object from an ApplyResults message. Also converts values to other types if specified. + * @param message ApplyResults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ApplyResults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApplyResults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApplyResults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TerraformOutput. */ + interface ITerraformOutput { + + /** TerraformOutput sensitive */ + sensitive?: (boolean|null); + + /** TerraformOutput value */ + value?: (google.protobuf.IValue|null); + } + + /** Represents a TerraformOutput. */ + class TerraformOutput implements ITerraformOutput { + + /** + * Constructs a new TerraformOutput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.ITerraformOutput); + + /** TerraformOutput sensitive. */ + public sensitive: boolean; + + /** TerraformOutput value. */ + public value?: (google.protobuf.IValue|null); + + /** + * Creates a new TerraformOutput instance using the specified properties. + * @param [properties] Properties to set + * @returns TerraformOutput instance + */ + public static create(properties?: google.cloud.config.v1.ITerraformOutput): google.cloud.config.v1.TerraformOutput; + + /** + * Encodes the specified TerraformOutput message. Does not implicitly {@link google.cloud.config.v1.TerraformOutput.verify|verify} messages. + * @param message TerraformOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.ITerraformOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerraformOutput message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformOutput.verify|verify} messages. + * @param message TerraformOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.ITerraformOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerraformOutput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerraformOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.TerraformOutput; + + /** + * Decodes a TerraformOutput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerraformOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.TerraformOutput; + + /** + * Verifies a TerraformOutput message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerraformOutput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerraformOutput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.TerraformOutput; + + /** + * Creates a plain object from a TerraformOutput message. Also converts values to other types if specified. + * @param message TerraformOutput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.TerraformOutput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerraformOutput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerraformOutput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDeploymentsRequest. */ + interface IListDeploymentsRequest { + + /** ListDeploymentsRequest parent */ + parent?: (string|null); + + /** ListDeploymentsRequest pageSize */ + pageSize?: (number|null); + + /** ListDeploymentsRequest pageToken */ + pageToken?: (string|null); + + /** ListDeploymentsRequest filter */ + filter?: (string|null); + + /** ListDeploymentsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDeploymentsRequest. */ + class ListDeploymentsRequest implements IListDeploymentsRequest { + + /** + * Constructs a new ListDeploymentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListDeploymentsRequest); + + /** ListDeploymentsRequest parent. */ + public parent: string; + + /** ListDeploymentsRequest pageSize. */ + public pageSize: number; + + /** ListDeploymentsRequest pageToken. */ + public pageToken: string; + + /** ListDeploymentsRequest filter. */ + public filter: string; + + /** ListDeploymentsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDeploymentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeploymentsRequest instance + */ + public static create(properties?: google.cloud.config.v1.IListDeploymentsRequest): google.cloud.config.v1.ListDeploymentsRequest; + + /** + * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsRequest.verify|verify} messages. + * @param message ListDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsRequest.verify|verify} messages. + * @param message ListDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeploymentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListDeploymentsRequest; + + /** + * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListDeploymentsRequest; + + /** + * Verifies a ListDeploymentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeploymentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListDeploymentsRequest; + + /** + * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. + * @param message ListDeploymentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeploymentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeploymentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDeploymentsResponse. */ + interface IListDeploymentsResponse { + + /** ListDeploymentsResponse deployments */ + deployments?: (google.cloud.config.v1.IDeployment[]|null); + + /** ListDeploymentsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDeploymentsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDeploymentsResponse. */ + class ListDeploymentsResponse implements IListDeploymentsResponse { + + /** + * Constructs a new ListDeploymentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListDeploymentsResponse); + + /** ListDeploymentsResponse deployments. */ + public deployments: google.cloud.config.v1.IDeployment[]; + + /** ListDeploymentsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDeploymentsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDeploymentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeploymentsResponse instance + */ + public static create(properties?: google.cloud.config.v1.IListDeploymentsResponse): google.cloud.config.v1.ListDeploymentsResponse; + + /** + * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsResponse.verify|verify} messages. + * @param message ListDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsResponse.verify|verify} messages. + * @param message ListDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeploymentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListDeploymentsResponse; + + /** + * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListDeploymentsResponse; + + /** + * Verifies a ListDeploymentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeploymentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListDeploymentsResponse; + + /** + * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. + * @param message ListDeploymentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeploymentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeploymentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDeploymentRequest. */ + interface IGetDeploymentRequest { + + /** GetDeploymentRequest name */ + name?: (string|null); + } + + /** Represents a GetDeploymentRequest. */ + class GetDeploymentRequest implements IGetDeploymentRequest { + + /** + * Constructs a new GetDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGetDeploymentRequest); + + /** GetDeploymentRequest name. */ + public name: string; + + /** + * Creates a new GetDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDeploymentRequest instance + */ + public static create(properties?: google.cloud.config.v1.IGetDeploymentRequest): google.cloud.config.v1.GetDeploymentRequest; + + /** + * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.GetDeploymentRequest.verify|verify} messages. + * @param message GetDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetDeploymentRequest.verify|verify} messages. + * @param message GetDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetDeploymentRequest; + + /** + * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetDeploymentRequest; + + /** + * Verifies a GetDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetDeploymentRequest; + + /** + * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. + * @param message GetDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GetDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRevisionsRequest. */ + interface IListRevisionsRequest { + + /** ListRevisionsRequest parent */ + parent?: (string|null); + + /** ListRevisionsRequest pageSize */ + pageSize?: (number|null); + + /** ListRevisionsRequest pageToken */ + pageToken?: (string|null); + + /** ListRevisionsRequest filter */ + filter?: (string|null); + + /** ListRevisionsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListRevisionsRequest. */ + class ListRevisionsRequest implements IListRevisionsRequest { + + /** + * Constructs a new ListRevisionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListRevisionsRequest); + + /** ListRevisionsRequest parent. */ + public parent: string; + + /** ListRevisionsRequest pageSize. */ + public pageSize: number; + + /** ListRevisionsRequest pageToken. */ + public pageToken: string; + + /** ListRevisionsRequest filter. */ + public filter: string; + + /** ListRevisionsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListRevisionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRevisionsRequest instance + */ + public static create(properties?: google.cloud.config.v1.IListRevisionsRequest): google.cloud.config.v1.ListRevisionsRequest; + + /** + * Encodes the specified ListRevisionsRequest message. Does not implicitly {@link google.cloud.config.v1.ListRevisionsRequest.verify|verify} messages. + * @param message ListRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListRevisionsRequest.verify|verify} messages. + * @param message ListRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRevisionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListRevisionsRequest; + + /** + * Decodes a ListRevisionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListRevisionsRequest; + + /** + * Verifies a ListRevisionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRevisionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListRevisionsRequest; + + /** + * Creates a plain object from a ListRevisionsRequest message. Also converts values to other types if specified. + * @param message ListRevisionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRevisionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRevisionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRevisionsResponse. */ + interface IListRevisionsResponse { + + /** ListRevisionsResponse revisions */ + revisions?: (google.cloud.config.v1.IRevision[]|null); + + /** ListRevisionsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListRevisionsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListRevisionsResponse. */ + class ListRevisionsResponse implements IListRevisionsResponse { + + /** + * Constructs a new ListRevisionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListRevisionsResponse); + + /** ListRevisionsResponse revisions. */ + public revisions: google.cloud.config.v1.IRevision[]; + + /** ListRevisionsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListRevisionsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListRevisionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRevisionsResponse instance + */ + public static create(properties?: google.cloud.config.v1.IListRevisionsResponse): google.cloud.config.v1.ListRevisionsResponse; + + /** + * Encodes the specified ListRevisionsResponse message. Does not implicitly {@link google.cloud.config.v1.ListRevisionsResponse.verify|verify} messages. + * @param message ListRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListRevisionsResponse.verify|verify} messages. + * @param message ListRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRevisionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListRevisionsResponse; + + /** + * Decodes a ListRevisionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListRevisionsResponse; + + /** + * Verifies a ListRevisionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRevisionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListRevisionsResponse; + + /** + * Creates a plain object from a ListRevisionsResponse message. Also converts values to other types if specified. + * @param message ListRevisionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRevisionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRevisionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetRevisionRequest. */ + interface IGetRevisionRequest { + + /** GetRevisionRequest name */ + name?: (string|null); + } + + /** Represents a GetRevisionRequest. */ + class GetRevisionRequest implements IGetRevisionRequest { + + /** + * Constructs a new GetRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGetRevisionRequest); + + /** GetRevisionRequest name. */ + public name: string; + + /** + * Creates a new GetRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRevisionRequest instance + */ + public static create(properties?: google.cloud.config.v1.IGetRevisionRequest): google.cloud.config.v1.GetRevisionRequest; + + /** + * Encodes the specified GetRevisionRequest message. Does not implicitly {@link google.cloud.config.v1.GetRevisionRequest.verify|verify} messages. + * @param message GetRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGetRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetRevisionRequest.verify|verify} messages. + * @param message GetRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGetRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetRevisionRequest; + + /** + * Decodes a GetRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetRevisionRequest; + + /** + * Verifies a GetRevisionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetRevisionRequest; + + /** + * Creates a plain object from a GetRevisionRequest message. Also converts values to other types if specified. + * @param message GetRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GetRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDeploymentRequest. */ + interface ICreateDeploymentRequest { + + /** CreateDeploymentRequest parent */ + parent?: (string|null); + + /** CreateDeploymentRequest deploymentId */ + deploymentId?: (string|null); + + /** CreateDeploymentRequest deployment */ + deployment?: (google.cloud.config.v1.IDeployment|null); + + /** CreateDeploymentRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateDeploymentRequest. */ + class CreateDeploymentRequest implements ICreateDeploymentRequest { + + /** + * Constructs a new CreateDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.ICreateDeploymentRequest); + + /** CreateDeploymentRequest parent. */ + public parent: string; + + /** CreateDeploymentRequest deploymentId. */ + public deploymentId: string; + + /** CreateDeploymentRequest deployment. */ + public deployment?: (google.cloud.config.v1.IDeployment|null); + + /** CreateDeploymentRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDeploymentRequest instance + */ + public static create(properties?: google.cloud.config.v1.ICreateDeploymentRequest): google.cloud.config.v1.CreateDeploymentRequest; + + /** + * Encodes the specified CreateDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.CreateDeploymentRequest.verify|verify} messages. + * @param message CreateDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.ICreateDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.CreateDeploymentRequest.verify|verify} messages. + * @param message CreateDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.ICreateDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.CreateDeploymentRequest; + + /** + * Decodes a CreateDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.CreateDeploymentRequest; + + /** + * Verifies a CreateDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.CreateDeploymentRequest; + + /** + * Creates a plain object from a CreateDeploymentRequest message. Also converts values to other types if specified. + * @param message CreateDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.CreateDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDeploymentRequest. */ + interface IUpdateDeploymentRequest { + + /** UpdateDeploymentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDeploymentRequest deployment */ + deployment?: (google.cloud.config.v1.IDeployment|null); + + /** UpdateDeploymentRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateDeploymentRequest. */ + class UpdateDeploymentRequest implements IUpdateDeploymentRequest { + + /** + * Constructs a new UpdateDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IUpdateDeploymentRequest); + + /** UpdateDeploymentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDeploymentRequest deployment. */ + public deployment?: (google.cloud.config.v1.IDeployment|null); + + /** UpdateDeploymentRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDeploymentRequest instance + */ + public static create(properties?: google.cloud.config.v1.IUpdateDeploymentRequest): google.cloud.config.v1.UpdateDeploymentRequest; + + /** + * Encodes the specified UpdateDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.UpdateDeploymentRequest.verify|verify} messages. + * @param message UpdateDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IUpdateDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UpdateDeploymentRequest.verify|verify} messages. + * @param message UpdateDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IUpdateDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.UpdateDeploymentRequest; + + /** + * Decodes an UpdateDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.UpdateDeploymentRequest; + + /** + * Verifies an UpdateDeploymentRequest message. + * @param message Plain 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 UpdateDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.UpdateDeploymentRequest; + + /** + * Creates a plain object from an UpdateDeploymentRequest message. Also converts values to other types if specified. + * @param message UpdateDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.UpdateDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDeploymentRequest. */ + interface IDeleteDeploymentRequest { + + /** DeleteDeploymentRequest name */ + name?: (string|null); + + /** DeleteDeploymentRequest requestId */ + requestId?: (string|null); + + /** DeleteDeploymentRequest force */ + force?: (boolean|null); + + /** DeleteDeploymentRequest deletePolicy */ + deletePolicy?: (google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy|keyof typeof google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy|null); + } + + /** Represents a DeleteDeploymentRequest. */ + class DeleteDeploymentRequest implements IDeleteDeploymentRequest { + + /** + * Constructs a new DeleteDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IDeleteDeploymentRequest); + + /** DeleteDeploymentRequest name. */ + public name: string; + + /** DeleteDeploymentRequest requestId. */ + public requestId: string; + + /** DeleteDeploymentRequest force. */ + public force: boolean; + + /** DeleteDeploymentRequest deletePolicy. */ + public deletePolicy: (google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy|keyof typeof google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy); + + /** + * Creates a new DeleteDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDeploymentRequest instance + */ + public static create(properties?: google.cloud.config.v1.IDeleteDeploymentRequest): google.cloud.config.v1.DeleteDeploymentRequest; + + /** + * Encodes the specified DeleteDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.DeleteDeploymentRequest.verify|verify} messages. + * @param message DeleteDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IDeleteDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeleteDeploymentRequest.verify|verify} messages. + * @param message DeleteDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IDeleteDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.DeleteDeploymentRequest; + + /** + * Decodes a DeleteDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.DeleteDeploymentRequest; + + /** + * Verifies a DeleteDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.DeleteDeploymentRequest; + + /** + * Creates a plain object from a DeleteDeploymentRequest message. Also converts values to other types if specified. + * @param message DeleteDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.DeleteDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeleteDeploymentRequest { + + /** DeletePolicy enum. */ + enum DeletePolicy { + DELETE_POLICY_UNSPECIFIED = 0, + DELETE = 1, + ABANDON = 2 + } + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata deploymentMetadata */ + deploymentMetadata?: (google.cloud.config.v1.IDeploymentOperationMetadata|null); + + /** OperationMetadata previewMetadata */ + previewMetadata?: (google.cloud.config.v1.IPreviewOperationMetadata|null); + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IOperationMetadata); + + /** OperationMetadata deploymentMetadata. */ + public deploymentMetadata?: (google.cloud.config.v1.IDeploymentOperationMetadata|null); + + /** OperationMetadata previewMetadata. */ + public previewMetadata?: (google.cloud.config.v1.IPreviewOperationMetadata|null); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** OperationMetadata resourceMetadata. */ + public resourceMetadata?: ("deploymentMetadata"|"previewMetadata"); + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.config.v1.IOperationMetadata): google.cloud.config.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.config.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Revision. */ + interface IRevision { + + /** Revision terraformBlueprint */ + terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); + + /** Revision name */ + name?: (string|null); + + /** Revision createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Revision updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Revision action */ + action?: (google.cloud.config.v1.Revision.Action|keyof typeof google.cloud.config.v1.Revision.Action|null); + + /** Revision state */ + state?: (google.cloud.config.v1.Revision.State|keyof typeof google.cloud.config.v1.Revision.State|null); + + /** Revision applyResults */ + applyResults?: (google.cloud.config.v1.IApplyResults|null); + + /** Revision stateDetail */ + stateDetail?: (string|null); + + /** Revision errorCode */ + errorCode?: (google.cloud.config.v1.Revision.ErrorCode|keyof typeof google.cloud.config.v1.Revision.ErrorCode|null); + + /** Revision build */ + build?: (string|null); + + /** Revision logs */ + logs?: (string|null); + + /** Revision tfErrors */ + tfErrors?: (google.cloud.config.v1.ITerraformError[]|null); + + /** Revision errorLogs */ + errorLogs?: (string|null); + + /** Revision serviceAccount */ + serviceAccount?: (string|null); + + /** Revision importExistingResources */ + importExistingResources?: (boolean|null); + + /** Revision workerPool */ + workerPool?: (string|null); + + /** Revision tfVersionConstraint */ + tfVersionConstraint?: (string|null); + + /** Revision tfVersion */ + tfVersion?: (string|null); + + /** Revision quotaValidationResults */ + quotaValidationResults?: (string|null); + + /** Revision quotaValidation */ + quotaValidation?: (google.cloud.config.v1.QuotaValidation|keyof typeof google.cloud.config.v1.QuotaValidation|null); + + /** Revision providerConfig */ + providerConfig?: (google.cloud.config.v1.IProviderConfig|null); + } + + /** Represents a Revision. */ + class Revision implements IRevision { + + /** + * Constructs a new Revision. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IRevision); + + /** Revision terraformBlueprint. */ + public terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); + + /** Revision name. */ + public name: string; + + /** Revision createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Revision updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Revision action. */ + public action: (google.cloud.config.v1.Revision.Action|keyof typeof google.cloud.config.v1.Revision.Action); + + /** Revision state. */ + public state: (google.cloud.config.v1.Revision.State|keyof typeof google.cloud.config.v1.Revision.State); + + /** Revision applyResults. */ + public applyResults?: (google.cloud.config.v1.IApplyResults|null); + + /** Revision stateDetail. */ + public stateDetail: string; + + /** Revision errorCode. */ + public errorCode: (google.cloud.config.v1.Revision.ErrorCode|keyof typeof google.cloud.config.v1.Revision.ErrorCode); + + /** Revision build. */ + public build: string; + + /** Revision logs. */ + public logs: string; + + /** Revision tfErrors. */ + public tfErrors: google.cloud.config.v1.ITerraformError[]; + + /** Revision errorLogs. */ + public errorLogs: string; + + /** Revision serviceAccount. */ + public serviceAccount: string; + + /** Revision importExistingResources. */ + public importExistingResources: boolean; + + /** Revision workerPool. */ + public workerPool: string; + + /** Revision tfVersionConstraint. */ + public tfVersionConstraint: string; + + /** Revision tfVersion. */ + public tfVersion: string; + + /** Revision quotaValidationResults. */ + public quotaValidationResults: string; + + /** Revision quotaValidation. */ + public quotaValidation: (google.cloud.config.v1.QuotaValidation|keyof typeof google.cloud.config.v1.QuotaValidation); + + /** Revision providerConfig. */ + public providerConfig?: (google.cloud.config.v1.IProviderConfig|null); + + /** Revision blueprint. */ + public blueprint?: "terraformBlueprint"; + + /** + * Creates a new Revision instance using the specified properties. + * @param [properties] Properties to set + * @returns Revision instance + */ + public static create(properties?: google.cloud.config.v1.IRevision): google.cloud.config.v1.Revision; + + /** + * Encodes the specified Revision message. Does not implicitly {@link google.cloud.config.v1.Revision.verify|verify} messages. + * @param message Revision message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IRevision, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Revision message, length delimited. Does not implicitly {@link google.cloud.config.v1.Revision.verify|verify} messages. + * @param message Revision message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IRevision, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Revision message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Revision + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.Revision; + + /** + * Decodes a Revision message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Revision + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.Revision; + + /** + * Verifies a Revision message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Revision message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Revision + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.Revision; + + /** + * Creates a plain object from a Revision message. Also converts values to other types if specified. + * @param message Revision + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.Revision, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Revision to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Revision + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Revision { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + CREATE = 1, + UPDATE = 2, + DELETE = 3 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + APPLYING = 1, + APPLIED = 2, + FAILED = 3 + } + + /** ErrorCode enum. */ + enum ErrorCode { + ERROR_CODE_UNSPECIFIED = 0, + CLOUD_BUILD_PERMISSION_DENIED = 1, + APPLY_BUILD_API_FAILED = 4, + APPLY_BUILD_RUN_FAILED = 5, + QUOTA_VALIDATION_FAILED = 7, + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 8 + } + } + + /** Properties of a TerraformError. */ + interface ITerraformError { + + /** TerraformError resourceAddress */ + resourceAddress?: (string|null); + + /** TerraformError httpResponseCode */ + httpResponseCode?: (number|null); + + /** TerraformError errorDescription */ + errorDescription?: (string|null); + + /** TerraformError error */ + error?: (google.rpc.IStatus|null); + } + + /** Represents a TerraformError. */ + class TerraformError implements ITerraformError { + + /** + * Constructs a new TerraformError. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.ITerraformError); + + /** TerraformError resourceAddress. */ + public resourceAddress: string; + + /** TerraformError httpResponseCode. */ + public httpResponseCode: number; + + /** TerraformError errorDescription. */ + public errorDescription: string; + + /** TerraformError error. */ + public error?: (google.rpc.IStatus|null); + + /** + * Creates a new TerraformError instance using the specified properties. + * @param [properties] Properties to set + * @returns TerraformError instance + */ + public static create(properties?: google.cloud.config.v1.ITerraformError): google.cloud.config.v1.TerraformError; + + /** + * Encodes the specified TerraformError message. Does not implicitly {@link google.cloud.config.v1.TerraformError.verify|verify} messages. + * @param message TerraformError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.ITerraformError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerraformError message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformError.verify|verify} messages. + * @param message TerraformError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.ITerraformError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerraformError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerraformError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.TerraformError; + + /** + * Decodes a TerraformError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerraformError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.TerraformError; + + /** + * Verifies a TerraformError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerraformError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerraformError + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.TerraformError; + + /** + * Creates a plain object from a TerraformError message. Also converts values to other types if specified. + * @param message TerraformError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.TerraformError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerraformError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerraformError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GitSource. */ + interface IGitSource { + + /** GitSource repo */ + repo?: (string|null); + + /** GitSource directory */ + directory?: (string|null); + + /** GitSource ref */ + ref?: (string|null); + } + + /** Represents a GitSource. */ + class GitSource implements IGitSource { + + /** + * Constructs a new GitSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGitSource); + + /** GitSource repo. */ + public repo?: (string|null); + + /** GitSource directory. */ + public directory?: (string|null); + + /** GitSource ref. */ + public ref?: (string|null); + + /** + * Creates a new GitSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GitSource instance + */ + public static create(properties?: google.cloud.config.v1.IGitSource): google.cloud.config.v1.GitSource; + + /** + * Encodes the specified GitSource message. Does not implicitly {@link google.cloud.config.v1.GitSource.verify|verify} messages. + * @param message GitSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGitSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitSource message, length delimited. Does not implicitly {@link google.cloud.config.v1.GitSource.verify|verify} messages. + * @param message GitSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGitSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GitSource; + + /** + * Decodes a GitSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GitSource; + + /** + * Verifies a GitSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GitSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GitSource; + + /** + * Creates a plain object from a GitSource message. Also converts values to other types if specified. + * @param message GitSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GitSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GitSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeploymentOperationMetadata. */ + interface IDeploymentOperationMetadata { + + /** DeploymentOperationMetadata step */ + step?: (google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep|keyof typeof google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep|null); + + /** DeploymentOperationMetadata applyResults */ + applyResults?: (google.cloud.config.v1.IApplyResults|null); + + /** DeploymentOperationMetadata build */ + build?: (string|null); + + /** DeploymentOperationMetadata logs */ + logs?: (string|null); + } + + /** Represents a DeploymentOperationMetadata. */ + class DeploymentOperationMetadata implements IDeploymentOperationMetadata { + + /** + * Constructs a new DeploymentOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IDeploymentOperationMetadata); + + /** DeploymentOperationMetadata step. */ + public step: (google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep|keyof typeof google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep); + + /** DeploymentOperationMetadata applyResults. */ + public applyResults?: (google.cloud.config.v1.IApplyResults|null); + + /** DeploymentOperationMetadata build. */ + public build: string; + + /** DeploymentOperationMetadata logs. */ + public logs: string; + + /** + * Creates a new DeploymentOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeploymentOperationMetadata instance + */ + public static create(properties?: google.cloud.config.v1.IDeploymentOperationMetadata): google.cloud.config.v1.DeploymentOperationMetadata; + + /** + * Encodes the specified DeploymentOperationMetadata message. Does not implicitly {@link google.cloud.config.v1.DeploymentOperationMetadata.verify|verify} messages. + * @param message DeploymentOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IDeploymentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeploymentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeploymentOperationMetadata.verify|verify} messages. + * @param message DeploymentOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IDeploymentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeploymentOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeploymentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.DeploymentOperationMetadata; + + /** + * Decodes a DeploymentOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeploymentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.DeploymentOperationMetadata; + + /** + * Verifies a DeploymentOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeploymentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeploymentOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.DeploymentOperationMetadata; + + /** + * Creates a plain object from a DeploymentOperationMetadata message. Also converts values to other types if specified. + * @param message DeploymentOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.DeploymentOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeploymentOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeploymentOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeploymentOperationMetadata { + + /** DeploymentStep enum. */ + enum DeploymentStep { + DEPLOYMENT_STEP_UNSPECIFIED = 0, + PREPARING_STORAGE_BUCKET = 1, + DOWNLOADING_BLUEPRINT = 2, + RUNNING_TF_INIT = 3, + RUNNING_TF_PLAN = 4, + RUNNING_TF_APPLY = 5, + RUNNING_TF_DESTROY = 6, + RUNNING_TF_VALIDATE = 7, + UNLOCKING_DEPLOYMENT = 8, + SUCCEEDED = 9, + FAILED = 10, + VALIDATING_REPOSITORY = 11, + RUNNING_QUOTA_VALIDATION = 12 + } + } + + /** Properties of a Resource. */ + interface IResource { + + /** Resource name */ + name?: (string|null); + + /** Resource terraformInfo */ + terraformInfo?: (google.cloud.config.v1.IResourceTerraformInfo|null); + + /** Resource caiAssets */ + caiAssets?: ({ [k: string]: google.cloud.config.v1.IResourceCAIInfo }|null); + + /** Resource intent */ + intent?: (google.cloud.config.v1.Resource.Intent|keyof typeof google.cloud.config.v1.Resource.Intent|null); + + /** Resource state */ + state?: (google.cloud.config.v1.Resource.State|keyof typeof google.cloud.config.v1.Resource.State|null); + } + + /** Represents a Resource. */ + class Resource implements IResource { + + /** + * Constructs a new Resource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IResource); + + /** Resource name. */ + public name: string; + + /** Resource terraformInfo. */ + public terraformInfo?: (google.cloud.config.v1.IResourceTerraformInfo|null); + + /** Resource caiAssets. */ + public caiAssets: { [k: string]: google.cloud.config.v1.IResourceCAIInfo }; + + /** Resource intent. */ + public intent: (google.cloud.config.v1.Resource.Intent|keyof typeof google.cloud.config.v1.Resource.Intent); + + /** Resource state. */ + public state: (google.cloud.config.v1.Resource.State|keyof typeof google.cloud.config.v1.Resource.State); + + /** + * Creates a new Resource instance using the specified properties. + * @param [properties] Properties to set + * @returns Resource instance + */ + public static create(properties?: google.cloud.config.v1.IResource): google.cloud.config.v1.Resource; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.config.v1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.config.v1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Resource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.Resource; + + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.Resource; + + /** + * Verifies a Resource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Resource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.Resource; + + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @param message Resource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Resource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Resource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Resource { + + /** Intent enum. */ + enum Intent { + INTENT_UNSPECIFIED = 0, + CREATE = 1, + UPDATE = 2, + DELETE = 3, + RECREATE = 4, + UNCHANGED = 5 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PLANNED = 1, + IN_PROGRESS = 2, + RECONCILED = 3, + FAILED = 4 + } + } + + /** Properties of a ResourceTerraformInfo. */ + interface IResourceTerraformInfo { + + /** ResourceTerraformInfo address */ + address?: (string|null); + + /** ResourceTerraformInfo type */ + type?: (string|null); + + /** ResourceTerraformInfo id */ + id?: (string|null); + } + + /** Represents a ResourceTerraformInfo. */ + class ResourceTerraformInfo implements IResourceTerraformInfo { + + /** + * Constructs a new ResourceTerraformInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IResourceTerraformInfo); + + /** ResourceTerraformInfo address. */ + public address: string; + + /** ResourceTerraformInfo type. */ + public type: string; + + /** ResourceTerraformInfo id. */ + public id: string; + + /** + * Creates a new ResourceTerraformInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceTerraformInfo instance + */ + public static create(properties?: google.cloud.config.v1.IResourceTerraformInfo): google.cloud.config.v1.ResourceTerraformInfo; + + /** + * Encodes the specified ResourceTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceTerraformInfo.verify|verify} messages. + * @param message ResourceTerraformInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IResourceTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceTerraformInfo.verify|verify} messages. + * @param message ResourceTerraformInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IResourceTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceTerraformInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceTerraformInfo; + + /** + * Decodes a ResourceTerraformInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceTerraformInfo; + + /** + * Verifies a ResourceTerraformInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceTerraformInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceTerraformInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceTerraformInfo; + + /** + * Creates a plain object from a ResourceTerraformInfo message. Also converts values to other types if specified. + * @param message ResourceTerraformInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ResourceTerraformInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceTerraformInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceTerraformInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceCAIInfo. */ + interface IResourceCAIInfo { + + /** ResourceCAIInfo fullResourceName */ + fullResourceName?: (string|null); + } + + /** Represents a ResourceCAIInfo. */ + class ResourceCAIInfo implements IResourceCAIInfo { + + /** + * Constructs a new ResourceCAIInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IResourceCAIInfo); + + /** ResourceCAIInfo fullResourceName. */ + public fullResourceName: string; + + /** + * Creates a new ResourceCAIInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceCAIInfo instance + */ + public static create(properties?: google.cloud.config.v1.IResourceCAIInfo): google.cloud.config.v1.ResourceCAIInfo; + + /** + * Encodes the specified ResourceCAIInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceCAIInfo.verify|verify} messages. + * @param message ResourceCAIInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IResourceCAIInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceCAIInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceCAIInfo.verify|verify} messages. + * @param message ResourceCAIInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IResourceCAIInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceCAIInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceCAIInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceCAIInfo; + + /** + * Decodes a ResourceCAIInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceCAIInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceCAIInfo; + + /** + * Verifies a ResourceCAIInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceCAIInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceCAIInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceCAIInfo; + + /** + * Creates a plain object from a ResourceCAIInfo message. Also converts values to other types if specified. + * @param message ResourceCAIInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ResourceCAIInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceCAIInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceCAIInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetResourceRequest. */ + interface IGetResourceRequest { + + /** GetResourceRequest name */ + name?: (string|null); + } + + /** Represents a GetResourceRequest. */ + class GetResourceRequest implements IGetResourceRequest { + + /** + * Constructs a new GetResourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGetResourceRequest); + + /** GetResourceRequest name. */ + public name: string; + + /** + * Creates a new GetResourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetResourceRequest instance + */ + public static create(properties?: google.cloud.config.v1.IGetResourceRequest): google.cloud.config.v1.GetResourceRequest; + + /** + * Encodes the specified GetResourceRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceRequest.verify|verify} messages. + * @param message GetResourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGetResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetResourceRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceRequest.verify|verify} messages. + * @param message GetResourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGetResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetResourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetResourceRequest; + + /** + * Decodes a GetResourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetResourceRequest; + + /** + * Verifies a GetResourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetResourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetResourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetResourceRequest; + + /** + * Creates a plain object from a GetResourceRequest message. Also converts values to other types if specified. + * @param message GetResourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GetResourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetResourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetResourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListResourcesRequest. */ + interface IListResourcesRequest { + + /** ListResourcesRequest parent */ + parent?: (string|null); + + /** ListResourcesRequest pageSize */ + pageSize?: (number|null); + + /** ListResourcesRequest pageToken */ + pageToken?: (string|null); + + /** ListResourcesRequest filter */ + filter?: (string|null); + + /** ListResourcesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListResourcesRequest. */ + class ListResourcesRequest implements IListResourcesRequest { + + /** + * Constructs a new ListResourcesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListResourcesRequest); + + /** ListResourcesRequest parent. */ + public parent: string; + + /** ListResourcesRequest pageSize. */ + public pageSize: number; + + /** ListResourcesRequest pageToken. */ + public pageToken: string; + + /** ListResourcesRequest filter. */ + public filter: string; + + /** ListResourcesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListResourcesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourcesRequest instance + */ + public static create(properties?: google.cloud.config.v1.IListResourcesRequest): google.cloud.config.v1.ListResourcesRequest; + + /** + * Encodes the specified ListResourcesRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourcesRequest.verify|verify} messages. + * @param message ListResourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourcesRequest.verify|verify} messages. + * @param message ListResourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourcesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourcesRequest; + + /** + * Decodes a ListResourcesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourcesRequest; + + /** + * Verifies a ListResourcesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourcesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourcesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourcesRequest; + + /** + * Creates a plain object from a ListResourcesRequest message. Also converts values to other types if specified. + * @param message ListResourcesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListResourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourcesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourcesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListResourcesResponse. */ + interface IListResourcesResponse { + + /** ListResourcesResponse resources */ + resources?: (google.cloud.config.v1.IResource[]|null); + + /** ListResourcesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListResourcesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListResourcesResponse. */ + class ListResourcesResponse implements IListResourcesResponse { + + /** + * Constructs a new ListResourcesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListResourcesResponse); + + /** ListResourcesResponse resources. */ + public resources: google.cloud.config.v1.IResource[]; + + /** ListResourcesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListResourcesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListResourcesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourcesResponse instance + */ + public static create(properties?: google.cloud.config.v1.IListResourcesResponse): google.cloud.config.v1.ListResourcesResponse; + + /** + * Encodes the specified ListResourcesResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourcesResponse.verify|verify} messages. + * @param message ListResourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourcesResponse.verify|verify} messages. + * @param message ListResourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourcesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourcesResponse; + + /** + * Decodes a ListResourcesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourcesResponse; + + /** + * Verifies a ListResourcesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourcesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourcesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourcesResponse; + + /** + * Creates a plain object from a ListResourcesResponse message. Also converts values to other types if specified. + * @param message ListResourcesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListResourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourcesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourcesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Statefile. */ + interface IStatefile { + + /** Statefile signedUri */ + signedUri?: (string|null); + } + + /** Represents a Statefile. */ + class Statefile implements IStatefile { + + /** + * Constructs a new Statefile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IStatefile); + + /** Statefile signedUri. */ + public signedUri: string; + + /** + * Creates a new Statefile instance using the specified properties. + * @param [properties] Properties to set + * @returns Statefile instance + */ + public static create(properties?: google.cloud.config.v1.IStatefile): google.cloud.config.v1.Statefile; + + /** + * Encodes the specified Statefile message. Does not implicitly {@link google.cloud.config.v1.Statefile.verify|verify} messages. + * @param message Statefile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IStatefile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Statefile message, length delimited. Does not implicitly {@link google.cloud.config.v1.Statefile.verify|verify} messages. + * @param message Statefile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IStatefile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Statefile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Statefile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.Statefile; + + /** + * Decodes a Statefile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Statefile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.Statefile; + + /** + * Verifies a Statefile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Statefile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Statefile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.Statefile; + + /** + * Creates a plain object from a Statefile message. Also converts values to other types if specified. + * @param message Statefile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.Statefile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Statefile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Statefile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportDeploymentStatefileRequest. */ + interface IExportDeploymentStatefileRequest { + + /** ExportDeploymentStatefileRequest parent */ + parent?: (string|null); + + /** ExportDeploymentStatefileRequest draft */ + draft?: (boolean|null); + } + + /** Represents an ExportDeploymentStatefileRequest. */ + class ExportDeploymentStatefileRequest implements IExportDeploymentStatefileRequest { + + /** + * Constructs a new ExportDeploymentStatefileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IExportDeploymentStatefileRequest); + + /** ExportDeploymentStatefileRequest parent. */ + public parent: string; + + /** ExportDeploymentStatefileRequest draft. */ + public draft: boolean; + + /** + * Creates a new ExportDeploymentStatefileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportDeploymentStatefileRequest instance + */ + public static create(properties?: google.cloud.config.v1.IExportDeploymentStatefileRequest): google.cloud.config.v1.ExportDeploymentStatefileRequest; + + /** + * Encodes the specified ExportDeploymentStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ExportDeploymentStatefileRequest.verify|verify} messages. + * @param message ExportDeploymentStatefileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IExportDeploymentStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportDeploymentStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportDeploymentStatefileRequest.verify|verify} messages. + * @param message ExportDeploymentStatefileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IExportDeploymentStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportDeploymentStatefileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportDeploymentStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ExportDeploymentStatefileRequest; + + /** + * Decodes an ExportDeploymentStatefileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportDeploymentStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ExportDeploymentStatefileRequest; + + /** + * Verifies an ExportDeploymentStatefileRequest message. + * @param message Plain 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 ExportDeploymentStatefileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportDeploymentStatefileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ExportDeploymentStatefileRequest; + + /** + * Creates a plain object from an ExportDeploymentStatefileRequest message. Also converts values to other types if specified. + * @param message ExportDeploymentStatefileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ExportDeploymentStatefileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportDeploymentStatefileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportDeploymentStatefileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportRevisionStatefileRequest. */ + interface IExportRevisionStatefileRequest { + + /** ExportRevisionStatefileRequest parent */ + parent?: (string|null); + } + + /** Represents an ExportRevisionStatefileRequest. */ + class ExportRevisionStatefileRequest implements IExportRevisionStatefileRequest { + + /** + * Constructs a new ExportRevisionStatefileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IExportRevisionStatefileRequest); + + /** ExportRevisionStatefileRequest parent. */ + public parent: string; + + /** + * Creates a new ExportRevisionStatefileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportRevisionStatefileRequest instance + */ + public static create(properties?: google.cloud.config.v1.IExportRevisionStatefileRequest): google.cloud.config.v1.ExportRevisionStatefileRequest; + + /** + * Encodes the specified ExportRevisionStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ExportRevisionStatefileRequest.verify|verify} messages. + * @param message ExportRevisionStatefileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IExportRevisionStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportRevisionStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportRevisionStatefileRequest.verify|verify} messages. + * @param message ExportRevisionStatefileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IExportRevisionStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportRevisionStatefileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportRevisionStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ExportRevisionStatefileRequest; + + /** + * Decodes an ExportRevisionStatefileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportRevisionStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ExportRevisionStatefileRequest; + + /** + * Verifies an ExportRevisionStatefileRequest message. + * @param message Plain 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 ExportRevisionStatefileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportRevisionStatefileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ExportRevisionStatefileRequest; + + /** + * Creates a plain object from an ExportRevisionStatefileRequest message. Also converts values to other types if specified. + * @param message ExportRevisionStatefileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ExportRevisionStatefileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportRevisionStatefileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportRevisionStatefileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportStatefileRequest. */ + interface IImportStatefileRequest { + + /** ImportStatefileRequest parent */ + parent?: (string|null); + + /** ImportStatefileRequest lockId */ + lockId?: (number|Long|string|null); + + /** ImportStatefileRequest skipDraft */ + skipDraft?: (boolean|null); + } + + /** Represents an ImportStatefileRequest. */ + class ImportStatefileRequest implements IImportStatefileRequest { + + /** + * Constructs a new ImportStatefileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IImportStatefileRequest); + + /** ImportStatefileRequest parent. */ + public parent: string; + + /** ImportStatefileRequest lockId. */ + public lockId: (number|Long|string); + + /** ImportStatefileRequest skipDraft. */ + public skipDraft: boolean; + + /** + * Creates a new ImportStatefileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportStatefileRequest instance + */ + public static create(properties?: google.cloud.config.v1.IImportStatefileRequest): google.cloud.config.v1.ImportStatefileRequest; + + /** + * Encodes the specified ImportStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ImportStatefileRequest.verify|verify} messages. + * @param message ImportStatefileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IImportStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ImportStatefileRequest.verify|verify} messages. + * @param message ImportStatefileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IImportStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportStatefileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ImportStatefileRequest; + + /** + * Decodes an ImportStatefileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ImportStatefileRequest; + + /** + * Verifies an ImportStatefileRequest message. + * @param message Plain 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 ImportStatefileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportStatefileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ImportStatefileRequest; + + /** + * Creates a plain object from an ImportStatefileRequest message. Also converts values to other types if specified. + * @param message ImportStatefileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ImportStatefileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportStatefileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportStatefileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteStatefileRequest. */ + interface IDeleteStatefileRequest { + + /** DeleteStatefileRequest name */ + name?: (string|null); + + /** DeleteStatefileRequest lockId */ + lockId?: (number|Long|string|null); + } + + /** Represents a DeleteStatefileRequest. */ + class DeleteStatefileRequest implements IDeleteStatefileRequest { + + /** + * Constructs a new DeleteStatefileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IDeleteStatefileRequest); + + /** DeleteStatefileRequest name. */ + public name: string; + + /** DeleteStatefileRequest lockId. */ + public lockId: (number|Long|string); + + /** + * Creates a new DeleteStatefileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteStatefileRequest instance + */ + public static create(properties?: google.cloud.config.v1.IDeleteStatefileRequest): google.cloud.config.v1.DeleteStatefileRequest; + + /** + * Encodes the specified DeleteStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.DeleteStatefileRequest.verify|verify} messages. + * @param message DeleteStatefileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IDeleteStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeleteStatefileRequest.verify|verify} messages. + * @param message DeleteStatefileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IDeleteStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteStatefileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.DeleteStatefileRequest; + + /** + * Decodes a DeleteStatefileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.DeleteStatefileRequest; + + /** + * Verifies a DeleteStatefileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteStatefileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteStatefileRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.DeleteStatefileRequest; + + /** + * Creates a plain object from a DeleteStatefileRequest message. Also converts values to other types if specified. + * @param message DeleteStatefileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.DeleteStatefileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteStatefileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteStatefileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockDeploymentRequest. */ + interface ILockDeploymentRequest { + + /** LockDeploymentRequest name */ + name?: (string|null); + } + + /** Represents a LockDeploymentRequest. */ + class LockDeploymentRequest implements ILockDeploymentRequest { + + /** + * Constructs a new LockDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.ILockDeploymentRequest); + + /** LockDeploymentRequest name. */ + public name: string; + + /** + * Creates a new LockDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LockDeploymentRequest instance + */ + public static create(properties?: google.cloud.config.v1.ILockDeploymentRequest): google.cloud.config.v1.LockDeploymentRequest; + + /** + * Encodes the specified LockDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.LockDeploymentRequest.verify|verify} messages. + * @param message LockDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.ILockDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.LockDeploymentRequest.verify|verify} messages. + * @param message LockDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.ILockDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.LockDeploymentRequest; + + /** + * Decodes a LockDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.LockDeploymentRequest; + + /** + * Verifies a LockDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.LockDeploymentRequest; + + /** + * Creates a plain object from a LockDeploymentRequest message. Also converts values to other types if specified. + * @param message LockDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.LockDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UnlockDeploymentRequest. */ + interface IUnlockDeploymentRequest { + + /** UnlockDeploymentRequest name */ + name?: (string|null); + + /** UnlockDeploymentRequest lockId */ + lockId?: (number|Long|string|null); + } + + /** Represents an UnlockDeploymentRequest. */ + class UnlockDeploymentRequest implements IUnlockDeploymentRequest { + + /** + * Constructs a new UnlockDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IUnlockDeploymentRequest); + + /** UnlockDeploymentRequest name. */ + public name: string; + + /** UnlockDeploymentRequest lockId. */ + public lockId: (number|Long|string); + + /** + * Creates a new UnlockDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UnlockDeploymentRequest instance + */ + public static create(properties?: google.cloud.config.v1.IUnlockDeploymentRequest): google.cloud.config.v1.UnlockDeploymentRequest; + + /** + * Encodes the specified UnlockDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.UnlockDeploymentRequest.verify|verify} messages. + * @param message UnlockDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IUnlockDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnlockDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UnlockDeploymentRequest.verify|verify} messages. + * @param message UnlockDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IUnlockDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnlockDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnlockDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.UnlockDeploymentRequest; + + /** + * Decodes an UnlockDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnlockDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.UnlockDeploymentRequest; + + /** + * Verifies an UnlockDeploymentRequest message. + * @param message Plain 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 UnlockDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnlockDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.UnlockDeploymentRequest; + + /** + * Creates a plain object from an UnlockDeploymentRequest message. Also converts values to other types if specified. + * @param message UnlockDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.UnlockDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnlockDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UnlockDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportLockInfoRequest. */ + interface IExportLockInfoRequest { + + /** ExportLockInfoRequest name */ + name?: (string|null); + } + + /** Represents an ExportLockInfoRequest. */ + class ExportLockInfoRequest implements IExportLockInfoRequest { + + /** + * Constructs a new ExportLockInfoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IExportLockInfoRequest); + + /** ExportLockInfoRequest name. */ + public name: string; + + /** + * Creates a new ExportLockInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportLockInfoRequest instance + */ + public static create(properties?: google.cloud.config.v1.IExportLockInfoRequest): google.cloud.config.v1.ExportLockInfoRequest; + + /** + * Encodes the specified ExportLockInfoRequest message. Does not implicitly {@link google.cloud.config.v1.ExportLockInfoRequest.verify|verify} messages. + * @param message ExportLockInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IExportLockInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportLockInfoRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportLockInfoRequest.verify|verify} messages. + * @param message ExportLockInfoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IExportLockInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportLockInfoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportLockInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ExportLockInfoRequest; + + /** + * Decodes an ExportLockInfoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportLockInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ExportLockInfoRequest; + + /** + * Verifies an ExportLockInfoRequest message. + * @param message Plain 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 ExportLockInfoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportLockInfoRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ExportLockInfoRequest; + + /** + * Creates a plain object from an ExportLockInfoRequest message. Also converts values to other types if specified. + * @param message ExportLockInfoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ExportLockInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportLockInfoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportLockInfoRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockInfo. */ + interface ILockInfo { + + /** LockInfo lockId */ + lockId?: (number|Long|string|null); + + /** LockInfo operation */ + operation?: (string|null); + + /** LockInfo info */ + info?: (string|null); + + /** LockInfo who */ + who?: (string|null); + + /** LockInfo version */ + version?: (string|null); + + /** LockInfo createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a LockInfo. */ + class LockInfo implements ILockInfo { + + /** + * Constructs a new LockInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.ILockInfo); + + /** LockInfo lockId. */ + public lockId: (number|Long|string); + + /** LockInfo operation. */ + public operation: string; + + /** LockInfo info. */ + public info: string; + + /** LockInfo who. */ + public who: string; + + /** LockInfo version. */ + public version: string; + + /** LockInfo createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new LockInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LockInfo instance + */ + public static create(properties?: google.cloud.config.v1.ILockInfo): google.cloud.config.v1.LockInfo; + + /** + * Encodes the specified LockInfo message. Does not implicitly {@link google.cloud.config.v1.LockInfo.verify|verify} messages. + * @param message LockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.ILockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.LockInfo.verify|verify} messages. + * @param message LockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.ILockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.LockInfo; + + /** + * Decodes a LockInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.LockInfo; + + /** + * Verifies a LockInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.LockInfo; + + /** + * Creates a plain object from a LockInfo message. Also converts values to other types if specified. + * @param message LockInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.LockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Preview. */ + interface IPreview { + + /** Preview terraformBlueprint */ + terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); + + /** Preview name */ + name?: (string|null); + + /** Preview createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Preview labels */ + labels?: ({ [k: string]: string }|null); + + /** Preview state */ + state?: (google.cloud.config.v1.Preview.State|keyof typeof google.cloud.config.v1.Preview.State|null); + + /** Preview deployment */ + deployment?: (string|null); + + /** Preview previewMode */ + previewMode?: (google.cloud.config.v1.Preview.PreviewMode|keyof typeof google.cloud.config.v1.Preview.PreviewMode|null); + + /** Preview serviceAccount */ + serviceAccount?: (string|null); + + /** Preview artifactsGcsBucket */ + artifactsGcsBucket?: (string|null); + + /** Preview workerPool */ + workerPool?: (string|null); + + /** Preview errorCode */ + errorCode?: (google.cloud.config.v1.Preview.ErrorCode|keyof typeof google.cloud.config.v1.Preview.ErrorCode|null); + + /** Preview errorStatus */ + errorStatus?: (google.rpc.IStatus|null); + + /** Preview build */ + build?: (string|null); + + /** Preview tfErrors */ + tfErrors?: (google.cloud.config.v1.ITerraformError[]|null); + + /** Preview errorLogs */ + errorLogs?: (string|null); + + /** Preview previewArtifacts */ + previewArtifacts?: (google.cloud.config.v1.IPreviewArtifacts|null); + + /** Preview logs */ + logs?: (string|null); + + /** Preview tfVersion */ + tfVersion?: (string|null); + + /** Preview tfVersionConstraint */ + tfVersionConstraint?: (string|null); + + /** Preview annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Preview providerConfig */ + providerConfig?: (google.cloud.config.v1.IProviderConfig|null); + } + + /** Represents a Preview. */ + class Preview implements IPreview { + + /** + * Constructs a new Preview. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IPreview); + + /** Preview terraformBlueprint. */ + public terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); + + /** Preview name. */ + public name: string; + + /** Preview createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Preview labels. */ + public labels: { [k: string]: string }; + + /** Preview state. */ + public state: (google.cloud.config.v1.Preview.State|keyof typeof google.cloud.config.v1.Preview.State); + + /** Preview deployment. */ + public deployment: string; + + /** Preview previewMode. */ + public previewMode: (google.cloud.config.v1.Preview.PreviewMode|keyof typeof google.cloud.config.v1.Preview.PreviewMode); + + /** Preview serviceAccount. */ + public serviceAccount: string; + + /** Preview artifactsGcsBucket. */ + public artifactsGcsBucket?: (string|null); + + /** Preview workerPool. */ + public workerPool?: (string|null); + + /** Preview errorCode. */ + public errorCode: (google.cloud.config.v1.Preview.ErrorCode|keyof typeof google.cloud.config.v1.Preview.ErrorCode); + + /** Preview errorStatus. */ + public errorStatus?: (google.rpc.IStatus|null); + + /** Preview build. */ + public build: string; + + /** Preview tfErrors. */ + public tfErrors: google.cloud.config.v1.ITerraformError[]; + + /** Preview errorLogs. */ + public errorLogs: string; + + /** Preview previewArtifacts. */ + public previewArtifacts?: (google.cloud.config.v1.IPreviewArtifacts|null); + + /** Preview logs. */ + public logs: string; + + /** Preview tfVersion. */ + public tfVersion: string; + + /** Preview tfVersionConstraint. */ + public tfVersionConstraint?: (string|null); + + /** Preview annotations. */ + public annotations: { [k: string]: string }; + + /** Preview providerConfig. */ + public providerConfig?: (google.cloud.config.v1.IProviderConfig|null); + + /** Preview blueprint. */ + public blueprint?: "terraformBlueprint"; + + /** + * Creates a new Preview instance using the specified properties. + * @param [properties] Properties to set + * @returns Preview instance + */ + public static create(properties?: google.cloud.config.v1.IPreview): google.cloud.config.v1.Preview; + + /** + * Encodes the specified Preview message. Does not implicitly {@link google.cloud.config.v1.Preview.verify|verify} messages. + * @param message Preview message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IPreview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Preview message, length delimited. Does not implicitly {@link google.cloud.config.v1.Preview.verify|verify} messages. + * @param message Preview message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IPreview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Preview message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Preview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.Preview; + + /** + * Decodes a Preview message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Preview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.Preview; + + /** + * Verifies a Preview message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Preview message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Preview + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.Preview; + + /** + * Creates a plain object from a Preview message. Also converts values to other types if specified. + * @param message Preview + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.Preview, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Preview to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Preview + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Preview { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + SUCCEEDED = 2, + APPLYING = 3, + STALE = 4, + DELETING = 5, + FAILED = 6, + DELETED = 7 + } + + /** PreviewMode enum. */ + enum PreviewMode { + PREVIEW_MODE_UNSPECIFIED = 0, + DEFAULT = 1, + DELETE = 2 + } + + /** ErrorCode enum. */ + enum ErrorCode { + ERROR_CODE_UNSPECIFIED = 0, + CLOUD_BUILD_PERMISSION_DENIED = 1, + BUCKET_CREATION_PERMISSION_DENIED = 2, + BUCKET_CREATION_FAILED = 3, + DEPLOYMENT_LOCK_ACQUIRE_FAILED = 4, + PREVIEW_BUILD_API_FAILED = 5, + PREVIEW_BUILD_RUN_FAILED = 6, + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 7 + } + } + + /** Properties of a PreviewOperationMetadata. */ + interface IPreviewOperationMetadata { + + /** PreviewOperationMetadata step */ + step?: (google.cloud.config.v1.PreviewOperationMetadata.PreviewStep|keyof typeof google.cloud.config.v1.PreviewOperationMetadata.PreviewStep|null); + + /** PreviewOperationMetadata previewArtifacts */ + previewArtifacts?: (google.cloud.config.v1.IPreviewArtifacts|null); + + /** PreviewOperationMetadata logs */ + logs?: (string|null); + + /** PreviewOperationMetadata build */ + build?: (string|null); + } + + /** Represents a PreviewOperationMetadata. */ + class PreviewOperationMetadata implements IPreviewOperationMetadata { + + /** + * Constructs a new PreviewOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IPreviewOperationMetadata); + + /** PreviewOperationMetadata step. */ + public step: (google.cloud.config.v1.PreviewOperationMetadata.PreviewStep|keyof typeof google.cloud.config.v1.PreviewOperationMetadata.PreviewStep); + + /** PreviewOperationMetadata previewArtifacts. */ + public previewArtifacts?: (google.cloud.config.v1.IPreviewArtifacts|null); + + /** PreviewOperationMetadata logs. */ + public logs: string; + + /** PreviewOperationMetadata build. */ + public build: string; + + /** + * Creates a new PreviewOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns PreviewOperationMetadata instance + */ + public static create(properties?: google.cloud.config.v1.IPreviewOperationMetadata): google.cloud.config.v1.PreviewOperationMetadata; + + /** + * Encodes the specified PreviewOperationMetadata message. Does not implicitly {@link google.cloud.config.v1.PreviewOperationMetadata.verify|verify} messages. + * @param message PreviewOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IPreviewOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreviewOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewOperationMetadata.verify|verify} messages. + * @param message PreviewOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IPreviewOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreviewOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreviewOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.PreviewOperationMetadata; + + /** + * Decodes a PreviewOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreviewOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.PreviewOperationMetadata; + + /** + * Verifies a PreviewOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreviewOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreviewOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PreviewOperationMetadata; + + /** + * Creates a plain object from a PreviewOperationMetadata message. Also converts values to other types if specified. + * @param message PreviewOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.PreviewOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreviewOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreviewOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PreviewOperationMetadata { + + /** PreviewStep enum. */ + enum PreviewStep { + PREVIEW_STEP_UNSPECIFIED = 0, + PREPARING_STORAGE_BUCKET = 1, + DOWNLOADING_BLUEPRINT = 2, + RUNNING_TF_INIT = 3, + RUNNING_TF_PLAN = 4, + FETCHING_DEPLOYMENT = 5, + LOCKING_DEPLOYMENT = 6, + UNLOCKING_DEPLOYMENT = 7, + SUCCEEDED = 8, + FAILED = 9, + VALIDATING_REPOSITORY = 10 + } + } + + /** Properties of a PreviewArtifacts. */ + interface IPreviewArtifacts { + + /** PreviewArtifacts content */ + content?: (string|null); + + /** PreviewArtifacts artifacts */ + artifacts?: (string|null); + } + + /** Represents a PreviewArtifacts. */ + class PreviewArtifacts implements IPreviewArtifacts { + + /** + * Constructs a new PreviewArtifacts. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IPreviewArtifacts); + + /** PreviewArtifacts content. */ + public content: string; + + /** PreviewArtifacts artifacts. */ + public artifacts: string; + + /** + * Creates a new PreviewArtifacts instance using the specified properties. + * @param [properties] Properties to set + * @returns PreviewArtifacts instance + */ + public static create(properties?: google.cloud.config.v1.IPreviewArtifacts): google.cloud.config.v1.PreviewArtifacts; + + /** + * Encodes the specified PreviewArtifacts message. Does not implicitly {@link google.cloud.config.v1.PreviewArtifacts.verify|verify} messages. + * @param message PreviewArtifacts message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IPreviewArtifacts, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreviewArtifacts message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewArtifacts.verify|verify} messages. + * @param message PreviewArtifacts message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IPreviewArtifacts, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreviewArtifacts message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreviewArtifacts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.PreviewArtifacts; + + /** + * Decodes a PreviewArtifacts message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreviewArtifacts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.PreviewArtifacts; + + /** + * Verifies a PreviewArtifacts message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreviewArtifacts message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreviewArtifacts + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PreviewArtifacts; + + /** + * Creates a plain object from a PreviewArtifacts message. Also converts values to other types if specified. + * @param message PreviewArtifacts + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.PreviewArtifacts, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreviewArtifacts to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreviewArtifacts + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePreviewRequest. */ + interface ICreatePreviewRequest { + + /** CreatePreviewRequest parent */ + parent?: (string|null); + + /** CreatePreviewRequest previewId */ + previewId?: (string|null); + + /** CreatePreviewRequest preview */ + preview?: (google.cloud.config.v1.IPreview|null); + + /** CreatePreviewRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreatePreviewRequest. */ + class CreatePreviewRequest implements ICreatePreviewRequest { + + /** + * Constructs a new CreatePreviewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.ICreatePreviewRequest); + + /** CreatePreviewRequest parent. */ + public parent: string; + + /** CreatePreviewRequest previewId. */ + public previewId: string; + + /** CreatePreviewRequest preview. */ + public preview?: (google.cloud.config.v1.IPreview|null); + + /** CreatePreviewRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreatePreviewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePreviewRequest instance + */ + public static create(properties?: google.cloud.config.v1.ICreatePreviewRequest): google.cloud.config.v1.CreatePreviewRequest; + + /** + * Encodes the specified CreatePreviewRequest message. Does not implicitly {@link google.cloud.config.v1.CreatePreviewRequest.verify|verify} messages. + * @param message CreatePreviewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.ICreatePreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.CreatePreviewRequest.verify|verify} messages. + * @param message CreatePreviewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.ICreatePreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePreviewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.CreatePreviewRequest; + + /** + * Decodes a CreatePreviewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.CreatePreviewRequest; + + /** + * Verifies a CreatePreviewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePreviewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePreviewRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.CreatePreviewRequest; + + /** + * Creates a plain object from a CreatePreviewRequest message. Also converts values to other types if specified. + * @param message CreatePreviewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.CreatePreviewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePreviewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePreviewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPreviewRequest. */ + interface IGetPreviewRequest { + + /** GetPreviewRequest name */ + name?: (string|null); + } + + /** Represents a GetPreviewRequest. */ + class GetPreviewRequest implements IGetPreviewRequest { + + /** + * Constructs a new GetPreviewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGetPreviewRequest); + + /** GetPreviewRequest name. */ + public name: string; + + /** + * Creates a new GetPreviewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPreviewRequest instance + */ + public static create(properties?: google.cloud.config.v1.IGetPreviewRequest): google.cloud.config.v1.GetPreviewRequest; + + /** + * Encodes the specified GetPreviewRequest message. Does not implicitly {@link google.cloud.config.v1.GetPreviewRequest.verify|verify} messages. + * @param message GetPreviewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGetPreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetPreviewRequest.verify|verify} messages. + * @param message GetPreviewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGetPreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPreviewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetPreviewRequest; + + /** + * Decodes a GetPreviewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetPreviewRequest; + + /** + * Verifies a GetPreviewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPreviewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPreviewRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetPreviewRequest; + + /** + * Creates a plain object from a GetPreviewRequest message. Also converts values to other types if specified. + * @param message GetPreviewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GetPreviewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPreviewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPreviewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPreviewsRequest. */ + interface IListPreviewsRequest { + + /** ListPreviewsRequest parent */ + parent?: (string|null); + + /** ListPreviewsRequest pageSize */ + pageSize?: (number|null); + + /** ListPreviewsRequest pageToken */ + pageToken?: (string|null); + + /** ListPreviewsRequest filter */ + filter?: (string|null); + + /** ListPreviewsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListPreviewsRequest. */ + class ListPreviewsRequest implements IListPreviewsRequest { + + /** + * Constructs a new ListPreviewsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListPreviewsRequest); + + /** ListPreviewsRequest parent. */ + public parent: string; + + /** ListPreviewsRequest pageSize. */ + public pageSize: number; + + /** ListPreviewsRequest pageToken. */ + public pageToken: string; + + /** ListPreviewsRequest filter. */ + public filter: string; + + /** ListPreviewsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListPreviewsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPreviewsRequest instance + */ + public static create(properties?: google.cloud.config.v1.IListPreviewsRequest): google.cloud.config.v1.ListPreviewsRequest; + + /** + * Encodes the specified ListPreviewsRequest message. Does not implicitly {@link google.cloud.config.v1.ListPreviewsRequest.verify|verify} messages. + * @param message ListPreviewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListPreviewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPreviewsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListPreviewsRequest.verify|verify} messages. + * @param message ListPreviewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListPreviewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPreviewsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPreviewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListPreviewsRequest; + + /** + * Decodes a ListPreviewsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPreviewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListPreviewsRequest; + + /** + * Verifies a ListPreviewsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPreviewsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPreviewsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListPreviewsRequest; + + /** + * Creates a plain object from a ListPreviewsRequest message. Also converts values to other types if specified. + * @param message ListPreviewsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListPreviewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPreviewsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPreviewsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPreviewsResponse. */ + interface IListPreviewsResponse { + + /** ListPreviewsResponse previews */ + previews?: (google.cloud.config.v1.IPreview[]|null); + + /** ListPreviewsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListPreviewsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListPreviewsResponse. */ + class ListPreviewsResponse implements IListPreviewsResponse { + + /** + * Constructs a new ListPreviewsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListPreviewsResponse); + + /** ListPreviewsResponse previews. */ + public previews: google.cloud.config.v1.IPreview[]; + + /** ListPreviewsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListPreviewsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListPreviewsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPreviewsResponse instance + */ + public static create(properties?: google.cloud.config.v1.IListPreviewsResponse): google.cloud.config.v1.ListPreviewsResponse; + + /** + * Encodes the specified ListPreviewsResponse message. Does not implicitly {@link google.cloud.config.v1.ListPreviewsResponse.verify|verify} messages. + * @param message ListPreviewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListPreviewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPreviewsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListPreviewsResponse.verify|verify} messages. + * @param message ListPreviewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListPreviewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPreviewsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPreviewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListPreviewsResponse; + + /** + * Decodes a ListPreviewsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPreviewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListPreviewsResponse; + + /** + * Verifies a ListPreviewsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPreviewsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPreviewsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListPreviewsResponse; + + /** + * Creates a plain object from a ListPreviewsResponse message. Also converts values to other types if specified. + * @param message ListPreviewsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListPreviewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPreviewsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPreviewsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePreviewRequest. */ + interface IDeletePreviewRequest { + + /** DeletePreviewRequest name */ + name?: (string|null); + + /** DeletePreviewRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeletePreviewRequest. */ + class DeletePreviewRequest implements IDeletePreviewRequest { + + /** + * Constructs a new DeletePreviewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IDeletePreviewRequest); + + /** DeletePreviewRequest name. */ + public name: string; + + /** DeletePreviewRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeletePreviewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePreviewRequest instance + */ + public static create(properties?: google.cloud.config.v1.IDeletePreviewRequest): google.cloud.config.v1.DeletePreviewRequest; + + /** + * Encodes the specified DeletePreviewRequest message. Does not implicitly {@link google.cloud.config.v1.DeletePreviewRequest.verify|verify} messages. + * @param message DeletePreviewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IDeletePreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeletePreviewRequest.verify|verify} messages. + * @param message DeletePreviewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IDeletePreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePreviewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.DeletePreviewRequest; + + /** + * Decodes a DeletePreviewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.DeletePreviewRequest; + + /** + * Verifies a DeletePreviewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePreviewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePreviewRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.DeletePreviewRequest; + + /** + * Creates a plain object from a DeletePreviewRequest message. Also converts values to other types if specified. + * @param message DeletePreviewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.DeletePreviewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePreviewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePreviewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportPreviewResultRequest. */ + interface IExportPreviewResultRequest { + + /** ExportPreviewResultRequest parent */ + parent?: (string|null); + } + + /** Represents an ExportPreviewResultRequest. */ + class ExportPreviewResultRequest implements IExportPreviewResultRequest { + + /** + * Constructs a new ExportPreviewResultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IExportPreviewResultRequest); + + /** ExportPreviewResultRequest parent. */ + public parent: string; + + /** + * Creates a new ExportPreviewResultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportPreviewResultRequest instance + */ + public static create(properties?: google.cloud.config.v1.IExportPreviewResultRequest): google.cloud.config.v1.ExportPreviewResultRequest; + + /** + * Encodes the specified ExportPreviewResultRequest message. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultRequest.verify|verify} messages. + * @param message ExportPreviewResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IExportPreviewResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportPreviewResultRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultRequest.verify|verify} messages. + * @param message ExportPreviewResultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IExportPreviewResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportPreviewResultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportPreviewResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ExportPreviewResultRequest; + + /** + * Decodes an ExportPreviewResultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportPreviewResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ExportPreviewResultRequest; + + /** + * Verifies an ExportPreviewResultRequest message. + * @param message Plain 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 ExportPreviewResultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportPreviewResultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ExportPreviewResultRequest; + + /** + * Creates a plain object from an ExportPreviewResultRequest message. Also converts values to other types if specified. + * @param message ExportPreviewResultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ExportPreviewResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportPreviewResultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportPreviewResultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportPreviewResultResponse. */ + interface IExportPreviewResultResponse { + + /** ExportPreviewResultResponse result */ + result?: (google.cloud.config.v1.IPreviewResult|null); + } + + /** Represents an ExportPreviewResultResponse. */ + class ExportPreviewResultResponse implements IExportPreviewResultResponse { + + /** + * Constructs a new ExportPreviewResultResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IExportPreviewResultResponse); + + /** ExportPreviewResultResponse result. */ + public result?: (google.cloud.config.v1.IPreviewResult|null); + + /** + * Creates a new ExportPreviewResultResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportPreviewResultResponse instance + */ + public static create(properties?: google.cloud.config.v1.IExportPreviewResultResponse): google.cloud.config.v1.ExportPreviewResultResponse; + + /** + * Encodes the specified ExportPreviewResultResponse message. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultResponse.verify|verify} messages. + * @param message ExportPreviewResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IExportPreviewResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportPreviewResultResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultResponse.verify|verify} messages. + * @param message ExportPreviewResultResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IExportPreviewResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportPreviewResultResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportPreviewResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ExportPreviewResultResponse; + + /** + * Decodes an ExportPreviewResultResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportPreviewResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ExportPreviewResultResponse; + + /** + * Verifies an ExportPreviewResultResponse message. + * @param message Plain 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 ExportPreviewResultResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportPreviewResultResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ExportPreviewResultResponse; + + /** + * Creates a plain object from an ExportPreviewResultResponse message. Also converts values to other types if specified. + * @param message ExportPreviewResultResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ExportPreviewResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportPreviewResultResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportPreviewResultResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PreviewResult. */ + interface IPreviewResult { + + /** PreviewResult binarySignedUri */ + binarySignedUri?: (string|null); + + /** PreviewResult jsonSignedUri */ + jsonSignedUri?: (string|null); + } + + /** Represents a PreviewResult. */ + class PreviewResult implements IPreviewResult { + + /** + * Constructs a new PreviewResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IPreviewResult); + + /** PreviewResult binarySignedUri. */ + public binarySignedUri: string; + + /** PreviewResult jsonSignedUri. */ + public jsonSignedUri: string; + + /** + * Creates a new PreviewResult instance using the specified properties. + * @param [properties] Properties to set + * @returns PreviewResult instance + */ + public static create(properties?: google.cloud.config.v1.IPreviewResult): google.cloud.config.v1.PreviewResult; + + /** + * Encodes the specified PreviewResult message. Does not implicitly {@link google.cloud.config.v1.PreviewResult.verify|verify} messages. + * @param message PreviewResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IPreviewResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreviewResult message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewResult.verify|verify} messages. + * @param message PreviewResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IPreviewResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreviewResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreviewResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.PreviewResult; + + /** + * Decodes a PreviewResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreviewResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.PreviewResult; + + /** + * Verifies a PreviewResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreviewResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreviewResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PreviewResult; + + /** + * Creates a plain object from a PreviewResult message. Also converts values to other types if specified. + * @param message PreviewResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.PreviewResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreviewResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreviewResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetTerraformVersionRequest. */ + interface IGetTerraformVersionRequest { + + /** GetTerraformVersionRequest name */ + name?: (string|null); + } + + /** Represents a GetTerraformVersionRequest. */ + class GetTerraformVersionRequest implements IGetTerraformVersionRequest { + + /** + * Constructs a new GetTerraformVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGetTerraformVersionRequest); + + /** GetTerraformVersionRequest name. */ + public name: string; + + /** + * Creates a new GetTerraformVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTerraformVersionRequest instance + */ + public static create(properties?: google.cloud.config.v1.IGetTerraformVersionRequest): google.cloud.config.v1.GetTerraformVersionRequest; + + /** + * Encodes the specified GetTerraformVersionRequest message. Does not implicitly {@link google.cloud.config.v1.GetTerraformVersionRequest.verify|verify} messages. + * @param message GetTerraformVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGetTerraformVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTerraformVersionRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetTerraformVersionRequest.verify|verify} messages. + * @param message GetTerraformVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGetTerraformVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTerraformVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTerraformVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetTerraformVersionRequest; + + /** + * Decodes a GetTerraformVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTerraformVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetTerraformVersionRequest; + + /** + * Verifies a GetTerraformVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetTerraformVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTerraformVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetTerraformVersionRequest; + + /** + * Creates a plain object from a GetTerraformVersionRequest message. Also converts values to other types if specified. + * @param message GetTerraformVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GetTerraformVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTerraformVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetTerraformVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTerraformVersionsRequest. */ + interface IListTerraformVersionsRequest { + + /** ListTerraformVersionsRequest parent */ + parent?: (string|null); + + /** ListTerraformVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListTerraformVersionsRequest pageToken */ + pageToken?: (string|null); + + /** ListTerraformVersionsRequest filter */ + filter?: (string|null); + + /** ListTerraformVersionsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListTerraformVersionsRequest. */ + class ListTerraformVersionsRequest implements IListTerraformVersionsRequest { + + /** + * Constructs a new ListTerraformVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListTerraformVersionsRequest); + + /** ListTerraformVersionsRequest parent. */ + public parent: string; + + /** ListTerraformVersionsRequest pageSize. */ + public pageSize: number; + + /** ListTerraformVersionsRequest pageToken. */ + public pageToken: string; + + /** ListTerraformVersionsRequest filter. */ + public filter: string; + + /** ListTerraformVersionsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListTerraformVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTerraformVersionsRequest instance + */ + public static create(properties?: google.cloud.config.v1.IListTerraformVersionsRequest): google.cloud.config.v1.ListTerraformVersionsRequest; + + /** + * Encodes the specified ListTerraformVersionsRequest message. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsRequest.verify|verify} messages. + * @param message ListTerraformVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListTerraformVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTerraformVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsRequest.verify|verify} messages. + * @param message ListTerraformVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListTerraformVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTerraformVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTerraformVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListTerraformVersionsRequest; + + /** + * Decodes a ListTerraformVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTerraformVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListTerraformVersionsRequest; + + /** + * Verifies a ListTerraformVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTerraformVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTerraformVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListTerraformVersionsRequest; + + /** + * Creates a plain object from a ListTerraformVersionsRequest message. Also converts values to other types if specified. + * @param message ListTerraformVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListTerraformVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTerraformVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTerraformVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTerraformVersionsResponse. */ + interface IListTerraformVersionsResponse { + + /** ListTerraformVersionsResponse terraformVersions */ + terraformVersions?: (google.cloud.config.v1.ITerraformVersion[]|null); + + /** ListTerraformVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListTerraformVersionsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListTerraformVersionsResponse. */ + class ListTerraformVersionsResponse implements IListTerraformVersionsResponse { + + /** + * Constructs a new ListTerraformVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListTerraformVersionsResponse); + + /** ListTerraformVersionsResponse terraformVersions. */ + public terraformVersions: google.cloud.config.v1.ITerraformVersion[]; + + /** ListTerraformVersionsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListTerraformVersionsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListTerraformVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTerraformVersionsResponse instance + */ + public static create(properties?: google.cloud.config.v1.IListTerraformVersionsResponse): google.cloud.config.v1.ListTerraformVersionsResponse; + + /** + * Encodes the specified ListTerraformVersionsResponse message. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsResponse.verify|verify} messages. + * @param message ListTerraformVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListTerraformVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTerraformVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsResponse.verify|verify} messages. + * @param message ListTerraformVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListTerraformVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTerraformVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTerraformVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListTerraformVersionsResponse; + + /** + * Decodes a ListTerraformVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTerraformVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListTerraformVersionsResponse; + + /** + * Verifies a ListTerraformVersionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTerraformVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTerraformVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListTerraformVersionsResponse; + + /** + * Creates a plain object from a ListTerraformVersionsResponse message. Also converts values to other types if specified. + * @param message ListTerraformVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListTerraformVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTerraformVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTerraformVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TerraformVersion. */ + interface ITerraformVersion { + + /** TerraformVersion name */ + name?: (string|null); + + /** TerraformVersion state */ + state?: (google.cloud.config.v1.TerraformVersion.State|keyof typeof google.cloud.config.v1.TerraformVersion.State|null); + + /** TerraformVersion supportTime */ + supportTime?: (google.protobuf.ITimestamp|null); + + /** TerraformVersion deprecateTime */ + deprecateTime?: (google.protobuf.ITimestamp|null); + + /** TerraformVersion obsoleteTime */ + obsoleteTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a TerraformVersion. */ + class TerraformVersion implements ITerraformVersion { + + /** + * Constructs a new TerraformVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.ITerraformVersion); + + /** TerraformVersion name. */ + public name: string; + + /** TerraformVersion state. */ + public state: (google.cloud.config.v1.TerraformVersion.State|keyof typeof google.cloud.config.v1.TerraformVersion.State); + + /** TerraformVersion supportTime. */ + public supportTime?: (google.protobuf.ITimestamp|null); + + /** TerraformVersion deprecateTime. */ + public deprecateTime?: (google.protobuf.ITimestamp|null); + + /** TerraformVersion obsoleteTime. */ + public obsoleteTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new TerraformVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns TerraformVersion instance + */ + public static create(properties?: google.cloud.config.v1.ITerraformVersion): google.cloud.config.v1.TerraformVersion; + + /** + * Encodes the specified TerraformVersion message. Does not implicitly {@link google.cloud.config.v1.TerraformVersion.verify|verify} messages. + * @param message TerraformVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.ITerraformVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TerraformVersion message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformVersion.verify|verify} messages. + * @param message TerraformVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.ITerraformVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TerraformVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TerraformVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.TerraformVersion; + + /** + * Decodes a TerraformVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TerraformVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.TerraformVersion; + + /** + * Verifies a TerraformVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerraformVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerraformVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.TerraformVersion; + + /** + * Creates a plain object from a TerraformVersion message. Also converts values to other types if specified. + * @param message TerraformVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.TerraformVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerraformVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerraformVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TerraformVersion { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + DEPRECATED = 2, + OBSOLETE = 3 + } + } + + /** Properties of a ResourceChangeTerraformInfo. */ + interface IResourceChangeTerraformInfo { + + /** ResourceChangeTerraformInfo address */ + address?: (string|null); + + /** ResourceChangeTerraformInfo type */ + type?: (string|null); + + /** ResourceChangeTerraformInfo resourceName */ + resourceName?: (string|null); + + /** ResourceChangeTerraformInfo provider */ + provider?: (string|null); + + /** ResourceChangeTerraformInfo actions */ + actions?: (string[]|null); + } + + /** Represents a ResourceChangeTerraformInfo. */ + class ResourceChangeTerraformInfo implements IResourceChangeTerraformInfo { + + /** + * Constructs a new ResourceChangeTerraformInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IResourceChangeTerraformInfo); + + /** ResourceChangeTerraformInfo address. */ + public address: string; + + /** ResourceChangeTerraformInfo type. */ + public type: string; + + /** ResourceChangeTerraformInfo resourceName. */ + public resourceName: string; + + /** ResourceChangeTerraformInfo provider. */ + public provider: string; + + /** ResourceChangeTerraformInfo actions. */ + public actions: string[]; + + /** + * Creates a new ResourceChangeTerraformInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceChangeTerraformInfo instance + */ + public static create(properties?: google.cloud.config.v1.IResourceChangeTerraformInfo): google.cloud.config.v1.ResourceChangeTerraformInfo; + + /** + * Encodes the specified ResourceChangeTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. + * @param message ResourceChangeTerraformInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IResourceChangeTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceChangeTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. + * @param message ResourceChangeTerraformInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IResourceChangeTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceChangeTerraformInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceChangeTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceChangeTerraformInfo; + + /** + * Decodes a ResourceChangeTerraformInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceChangeTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceChangeTerraformInfo; + + /** + * Verifies a ResourceChangeTerraformInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceChangeTerraformInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceChangeTerraformInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceChangeTerraformInfo; + + /** + * Creates a plain object from a ResourceChangeTerraformInfo message. Also converts values to other types if specified. + * @param message ResourceChangeTerraformInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ResourceChangeTerraformInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceChangeTerraformInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceChangeTerraformInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceChange. */ + interface IResourceChange { + + /** ResourceChange name */ + name?: (string|null); + + /** ResourceChange terraformInfo */ + terraformInfo?: (google.cloud.config.v1.IResourceChangeTerraformInfo|null); + + /** ResourceChange intent */ + intent?: (google.cloud.config.v1.ResourceChange.Intent|keyof typeof google.cloud.config.v1.ResourceChange.Intent|null); + + /** ResourceChange propertyChanges */ + propertyChanges?: (google.cloud.config.v1.IPropertyChange[]|null); + } + + /** Represents a ResourceChange. */ + class ResourceChange implements IResourceChange { + + /** + * Constructs a new ResourceChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IResourceChange); + + /** ResourceChange name. */ + public name: string; + + /** ResourceChange terraformInfo. */ + public terraformInfo?: (google.cloud.config.v1.IResourceChangeTerraformInfo|null); + + /** ResourceChange intent. */ + public intent: (google.cloud.config.v1.ResourceChange.Intent|keyof typeof google.cloud.config.v1.ResourceChange.Intent); + + /** ResourceChange propertyChanges. */ + public propertyChanges: google.cloud.config.v1.IPropertyChange[]; + + /** + * Creates a new ResourceChange instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceChange instance + */ + public static create(properties?: google.cloud.config.v1.IResourceChange): google.cloud.config.v1.ResourceChange; + + /** + * Encodes the specified ResourceChange message. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. + * @param message ResourceChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IResourceChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. + * @param message ResourceChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IResourceChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceChange; + + /** + * Decodes a ResourceChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceChange; + + /** + * Verifies a ResourceChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceChange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceChange; + + /** + * Creates a plain object from a ResourceChange message. Also converts values to other types if specified. + * @param message ResourceChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ResourceChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceChange { + + /** Intent enum. */ + enum Intent { + INTENT_UNSPECIFIED = 0, + CREATE = 1, + UPDATE = 2, + DELETE = 3, + RECREATE = 4, + UNCHANGED = 5 + } + } + + /** Properties of a PropertyChange. */ + interface IPropertyChange { + + /** PropertyChange path */ + path?: (string|null); + + /** PropertyChange beforeSensitivePaths */ + beforeSensitivePaths?: (string[]|null); + + /** PropertyChange before */ + before?: (google.protobuf.IValue|null); + + /** PropertyChange afterSensitivePaths */ + afterSensitivePaths?: (string[]|null); + + /** PropertyChange after */ + after?: (google.protobuf.IValue|null); + } + + /** Represents a PropertyChange. */ + class PropertyChange implements IPropertyChange { + + /** + * Constructs a new PropertyChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IPropertyChange); + + /** PropertyChange path. */ + public path: string; + + /** PropertyChange beforeSensitivePaths. */ + public beforeSensitivePaths: string[]; + + /** PropertyChange before. */ + public before?: (google.protobuf.IValue|null); + + /** PropertyChange afterSensitivePaths. */ + public afterSensitivePaths: string[]; + + /** PropertyChange after. */ + public after?: (google.protobuf.IValue|null); + + /** + * Creates a new PropertyChange instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyChange instance + */ + public static create(properties?: google.cloud.config.v1.IPropertyChange): google.cloud.config.v1.PropertyChange; + + /** + * Encodes the specified PropertyChange message. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. + * @param message PropertyChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IPropertyChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. + * @param message PropertyChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IPropertyChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.PropertyChange; + + /** + * Decodes a PropertyChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.PropertyChange; + + /** + * Verifies a PropertyChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PropertyChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyChange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PropertyChange; + + /** + * Creates a plain object from a PropertyChange message. Also converts values to other types if specified. + * @param message PropertyChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.PropertyChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListResourceChangesRequest. */ + interface IListResourceChangesRequest { + + /** ListResourceChangesRequest parent */ + parent?: (string|null); + + /** ListResourceChangesRequest pageSize */ + pageSize?: (number|null); + + /** ListResourceChangesRequest pageToken */ + pageToken?: (string|null); + + /** ListResourceChangesRequest filter */ + filter?: (string|null); + + /** ListResourceChangesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListResourceChangesRequest. */ + class ListResourceChangesRequest implements IListResourceChangesRequest { + + /** + * Constructs a new ListResourceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListResourceChangesRequest); + + /** ListResourceChangesRequest parent. */ + public parent: string; + + /** ListResourceChangesRequest pageSize. */ + public pageSize: number; + + /** ListResourceChangesRequest pageToken. */ + public pageToken: string; + + /** ListResourceChangesRequest filter. */ + public filter: string; + + /** ListResourceChangesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListResourceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourceChangesRequest instance + */ + public static create(properties?: google.cloud.config.v1.IListResourceChangesRequest): google.cloud.config.v1.ListResourceChangesRequest; + + /** + * Encodes the specified ListResourceChangesRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. + * @param message ListResourceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListResourceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. + * @param message ListResourceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListResourceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourceChangesRequest; + + /** + * Decodes a ListResourceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourceChangesRequest; + + /** + * Verifies a ListResourceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceChangesRequest; + + /** + * Creates a plain object from a ListResourceChangesRequest message. Also converts values to other types if specified. + * @param message ListResourceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListResourceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourceChangesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListResourceChangesResponse. */ + interface IListResourceChangesResponse { + + /** ListResourceChangesResponse resourceChanges */ + resourceChanges?: (google.cloud.config.v1.IResourceChange[]|null); + + /** ListResourceChangesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListResourceChangesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListResourceChangesResponse. */ + class ListResourceChangesResponse implements IListResourceChangesResponse { + + /** + * Constructs a new ListResourceChangesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListResourceChangesResponse); + + /** ListResourceChangesResponse resourceChanges. */ + public resourceChanges: google.cloud.config.v1.IResourceChange[]; + + /** ListResourceChangesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListResourceChangesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListResourceChangesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourceChangesResponse instance + */ + public static create(properties?: google.cloud.config.v1.IListResourceChangesResponse): google.cloud.config.v1.ListResourceChangesResponse; + + /** + * Encodes the specified ListResourceChangesResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. + * @param message ListResourceChangesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListResourceChangesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourceChangesResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. + * @param message ListResourceChangesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListResourceChangesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourceChangesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourceChangesResponse; + + /** + * Decodes a ListResourceChangesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourceChangesResponse; + + /** + * Verifies a ListResourceChangesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourceChangesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourceChangesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceChangesResponse; + + /** + * Creates a plain object from a ListResourceChangesResponse message. Also converts values to other types if specified. + * @param message ListResourceChangesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListResourceChangesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourceChangesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourceChangesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetResourceChangeRequest. */ + interface IGetResourceChangeRequest { + + /** GetResourceChangeRequest name */ + name?: (string|null); + } + + /** Represents a GetResourceChangeRequest. */ + class GetResourceChangeRequest implements IGetResourceChangeRequest { + + /** + * Constructs a new GetResourceChangeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGetResourceChangeRequest); + + /** GetResourceChangeRequest name. */ + public name: string; + + /** + * Creates a new GetResourceChangeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetResourceChangeRequest instance + */ + public static create(properties?: google.cloud.config.v1.IGetResourceChangeRequest): google.cloud.config.v1.GetResourceChangeRequest; + + /** + * Encodes the specified GetResourceChangeRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. + * @param message GetResourceChangeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGetResourceChangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetResourceChangeRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. + * @param message GetResourceChangeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGetResourceChangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetResourceChangeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetResourceChangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetResourceChangeRequest; + + /** + * Decodes a GetResourceChangeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetResourceChangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetResourceChangeRequest; + + /** + * Verifies a GetResourceChangeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetResourceChangeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetResourceChangeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetResourceChangeRequest; + + /** + * Creates a plain object from a GetResourceChangeRequest message. Also converts values to other types if specified. + * @param message GetResourceChangeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GetResourceChangeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetResourceChangeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetResourceChangeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceDriftTerraformInfo. */ + interface IResourceDriftTerraformInfo { + + /** ResourceDriftTerraformInfo address */ + address?: (string|null); + + /** ResourceDriftTerraformInfo type */ + type?: (string|null); + + /** ResourceDriftTerraformInfo resourceName */ + resourceName?: (string|null); + + /** ResourceDriftTerraformInfo provider */ + provider?: (string|null); + } + + /** Represents a ResourceDriftTerraformInfo. */ + class ResourceDriftTerraformInfo implements IResourceDriftTerraformInfo { + + /** + * Constructs a new ResourceDriftTerraformInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IResourceDriftTerraformInfo); + + /** ResourceDriftTerraformInfo address. */ + public address: string; + + /** ResourceDriftTerraformInfo type. */ + public type: string; + + /** ResourceDriftTerraformInfo resourceName. */ + public resourceName: string; + + /** ResourceDriftTerraformInfo provider. */ + public provider: string; + + /** + * Creates a new ResourceDriftTerraformInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDriftTerraformInfo instance + */ + public static create(properties?: google.cloud.config.v1.IResourceDriftTerraformInfo): google.cloud.config.v1.ResourceDriftTerraformInfo; + + /** + * Encodes the specified ResourceDriftTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. + * @param message ResourceDriftTerraformInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IResourceDriftTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDriftTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. + * @param message ResourceDriftTerraformInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IResourceDriftTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDriftTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceDriftTerraformInfo; + + /** + * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDriftTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceDriftTerraformInfo; + + /** + * Verifies a ResourceDriftTerraformInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDriftTerraformInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDriftTerraformInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceDriftTerraformInfo; + + /** + * Creates a plain object from a ResourceDriftTerraformInfo message. Also converts values to other types if specified. + * @param message ResourceDriftTerraformInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ResourceDriftTerraformInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDriftTerraformInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDriftTerraformInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceDrift. */ + interface IResourceDrift { + + /** ResourceDrift name */ + name?: (string|null); + + /** ResourceDrift terraformInfo */ + terraformInfo?: (google.cloud.config.v1.IResourceDriftTerraformInfo|null); + + /** ResourceDrift propertyDrifts */ + propertyDrifts?: (google.cloud.config.v1.IPropertyDrift[]|null); + } + + /** Represents a ResourceDrift. */ + class ResourceDrift implements IResourceDrift { + + /** + * Constructs a new ResourceDrift. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IResourceDrift); + + /** ResourceDrift name. */ + public name: string; + + /** ResourceDrift terraformInfo. */ + public terraformInfo?: (google.cloud.config.v1.IResourceDriftTerraformInfo|null); + + /** ResourceDrift propertyDrifts. */ + public propertyDrifts: google.cloud.config.v1.IPropertyDrift[]; + + /** + * Creates a new ResourceDrift instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDrift instance + */ + public static create(properties?: google.cloud.config.v1.IResourceDrift): google.cloud.config.v1.ResourceDrift; + + /** + * Encodes the specified ResourceDrift message. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. + * @param message ResourceDrift message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IResourceDrift, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. + * @param message ResourceDrift message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IResourceDrift, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDrift message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceDrift; + + /** + * Decodes a ResourceDrift message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceDrift; + + /** + * Verifies a ResourceDrift message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDrift message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDrift + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceDrift; + + /** + * Creates a plain object from a ResourceDrift message. Also converts values to other types if specified. + * @param message ResourceDrift + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ResourceDrift, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDrift to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDrift + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertyDrift. */ + interface IPropertyDrift { + + /** PropertyDrift path */ + path?: (string|null); + + /** PropertyDrift beforeSensitivePaths */ + beforeSensitivePaths?: (string[]|null); + + /** PropertyDrift before */ + before?: (google.protobuf.IValue|null); + + /** PropertyDrift afterSensitivePaths */ + afterSensitivePaths?: (string[]|null); + + /** PropertyDrift after */ + after?: (google.protobuf.IValue|null); + } + + /** Represents a PropertyDrift. */ + class PropertyDrift implements IPropertyDrift { + + /** + * Constructs a new PropertyDrift. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IPropertyDrift); + + /** PropertyDrift path. */ + public path: string; + + /** PropertyDrift beforeSensitivePaths. */ + public beforeSensitivePaths: string[]; + + /** PropertyDrift before. */ + public before?: (google.protobuf.IValue|null); + + /** PropertyDrift afterSensitivePaths. */ + public afterSensitivePaths: string[]; + + /** PropertyDrift after. */ + public after?: (google.protobuf.IValue|null); + + /** + * Creates a new PropertyDrift instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyDrift instance + */ + public static create(properties?: google.cloud.config.v1.IPropertyDrift): google.cloud.config.v1.PropertyDrift; + + /** + * Encodes the specified PropertyDrift message. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. + * @param message PropertyDrift message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IPropertyDrift, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. + * @param message PropertyDrift message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IPropertyDrift, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyDrift message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.PropertyDrift; + + /** + * Decodes a PropertyDrift message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.PropertyDrift; + + /** + * Verifies a PropertyDrift message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PropertyDrift message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyDrift + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PropertyDrift; + + /** + * Creates a plain object from a PropertyDrift message. Also converts values to other types if specified. + * @param message PropertyDrift + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.PropertyDrift, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyDrift to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyDrift + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListResourceDriftsRequest. */ + interface IListResourceDriftsRequest { + + /** ListResourceDriftsRequest parent */ + parent?: (string|null); + + /** ListResourceDriftsRequest pageSize */ + pageSize?: (number|null); + + /** ListResourceDriftsRequest pageToken */ + pageToken?: (string|null); + + /** ListResourceDriftsRequest filter */ + filter?: (string|null); + + /** ListResourceDriftsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListResourceDriftsRequest. */ + class ListResourceDriftsRequest implements IListResourceDriftsRequest { + + /** + * Constructs a new ListResourceDriftsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListResourceDriftsRequest); + + /** ListResourceDriftsRequest parent. */ + public parent: string; + + /** ListResourceDriftsRequest pageSize. */ + public pageSize: number; + + /** ListResourceDriftsRequest pageToken. */ + public pageToken: string; + + /** ListResourceDriftsRequest filter. */ + public filter: string; + + /** ListResourceDriftsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListResourceDriftsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourceDriftsRequest instance + */ + public static create(properties?: google.cloud.config.v1.IListResourceDriftsRequest): google.cloud.config.v1.ListResourceDriftsRequest; + + /** + * Encodes the specified ListResourceDriftsRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. + * @param message ListResourceDriftsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListResourceDriftsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourceDriftsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. + * @param message ListResourceDriftsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListResourceDriftsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourceDriftsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourceDriftsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourceDriftsRequest; + + /** + * Decodes a ListResourceDriftsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourceDriftsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourceDriftsRequest; + + /** + * Verifies a ListResourceDriftsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourceDriftsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourceDriftsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceDriftsRequest; + + /** + * Creates a plain object from a ListResourceDriftsRequest message. Also converts values to other types if specified. + * @param message ListResourceDriftsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListResourceDriftsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourceDriftsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourceDriftsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListResourceDriftsResponse. */ + interface IListResourceDriftsResponse { + + /** ListResourceDriftsResponse resourceDrifts */ + resourceDrifts?: (google.cloud.config.v1.IResourceDrift[]|null); + + /** ListResourceDriftsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListResourceDriftsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListResourceDriftsResponse. */ + class ListResourceDriftsResponse implements IListResourceDriftsResponse { + + /** + * Constructs a new ListResourceDriftsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListResourceDriftsResponse); + + /** ListResourceDriftsResponse resourceDrifts. */ + public resourceDrifts: google.cloud.config.v1.IResourceDrift[]; + + /** ListResourceDriftsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListResourceDriftsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListResourceDriftsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourceDriftsResponse instance + */ + public static create(properties?: google.cloud.config.v1.IListResourceDriftsResponse): google.cloud.config.v1.ListResourceDriftsResponse; + + /** + * Encodes the specified ListResourceDriftsResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. + * @param message ListResourceDriftsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListResourceDriftsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourceDriftsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. + * @param message ListResourceDriftsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListResourceDriftsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourceDriftsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourceDriftsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourceDriftsResponse; + + /** + * Decodes a ListResourceDriftsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourceDriftsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourceDriftsResponse; + + /** + * Verifies a ListResourceDriftsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourceDriftsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourceDriftsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceDriftsResponse; + + /** + * Creates a plain object from a ListResourceDriftsResponse message. Also converts values to other types if specified. + * @param message ListResourceDriftsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListResourceDriftsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourceDriftsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourceDriftsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetResourceDriftRequest. */ + interface IGetResourceDriftRequest { + + /** GetResourceDriftRequest name */ + name?: (string|null); + } + + /** Represents a GetResourceDriftRequest. */ + class GetResourceDriftRequest implements IGetResourceDriftRequest { + + /** + * Constructs a new GetResourceDriftRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGetResourceDriftRequest); + + /** GetResourceDriftRequest name. */ + public name: string; + + /** + * Creates a new GetResourceDriftRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetResourceDriftRequest instance + */ + public static create(properties?: google.cloud.config.v1.IGetResourceDriftRequest): google.cloud.config.v1.GetResourceDriftRequest; + + /** + * Encodes the specified GetResourceDriftRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. + * @param message GetResourceDriftRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGetResourceDriftRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetResourceDriftRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. + * @param message GetResourceDriftRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGetResourceDriftRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetResourceDriftRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetResourceDriftRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetResourceDriftRequest; + + /** + * Decodes a GetResourceDriftRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetResourceDriftRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetResourceDriftRequest; + + /** + * Verifies a GetResourceDriftRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetResourceDriftRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetResourceDriftRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetResourceDriftRequest; + + /** + * Creates a plain object from a GetResourceDriftRequest message. Also converts values to other types if specified. + * @param message GetResourceDriftRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GetResourceDriftRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetResourceDriftRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetResourceDriftRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProviderConfig. */ + interface IProviderConfig { + + /** ProviderConfig sourceType */ + sourceType?: (google.cloud.config.v1.ProviderConfig.ProviderSource|keyof typeof google.cloud.config.v1.ProviderConfig.ProviderSource|null); + } + + /** Represents a ProviderConfig. */ + class ProviderConfig implements IProviderConfig { + + /** + * Constructs a new ProviderConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IProviderConfig); + + /** ProviderConfig sourceType. */ + public sourceType?: (google.cloud.config.v1.ProviderConfig.ProviderSource|keyof typeof google.cloud.config.v1.ProviderConfig.ProviderSource|null); + + /** + * Creates a new ProviderConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ProviderConfig instance + */ + public static create(properties?: google.cloud.config.v1.IProviderConfig): google.cloud.config.v1.ProviderConfig; + + /** + * Encodes the specified ProviderConfig message. Does not implicitly {@link google.cloud.config.v1.ProviderConfig.verify|verify} messages. + * @param message ProviderConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IProviderConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProviderConfig message, length delimited. Does not implicitly {@link google.cloud.config.v1.ProviderConfig.verify|verify} messages. + * @param message ProviderConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IProviderConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProviderConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProviderConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ProviderConfig; + + /** + * Decodes a ProviderConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProviderConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ProviderConfig; + + /** + * Verifies a ProviderConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProviderConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProviderConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ProviderConfig; + + /** + * Creates a plain object from a ProviderConfig message. Also converts values to other types if specified. + * @param message ProviderConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ProviderConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProviderConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProviderConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProviderConfig { + + /** ProviderSource enum. */ + enum ProviderSource { + PROVIDER_SOURCE_UNSPECIFIED = 0, + SERVICE_MAINTAINED = 1 + } + } + + /** Properties of a GetAutoMigrationConfigRequest. */ + interface IGetAutoMigrationConfigRequest { + + /** GetAutoMigrationConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetAutoMigrationConfigRequest. */ + class GetAutoMigrationConfigRequest implements IGetAutoMigrationConfigRequest { + + /** + * Constructs a new GetAutoMigrationConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGetAutoMigrationConfigRequest); + + /** GetAutoMigrationConfigRequest name. */ + public name: string; + + /** + * Creates a new GetAutoMigrationConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAutoMigrationConfigRequest instance + */ + public static create(properties?: google.cloud.config.v1.IGetAutoMigrationConfigRequest): google.cloud.config.v1.GetAutoMigrationConfigRequest; + + /** + * Encodes the specified GetAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. + * @param message GetAutoMigrationConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGetAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. + * @param message GetAutoMigrationConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGetAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetAutoMigrationConfigRequest; + + /** + * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetAutoMigrationConfigRequest; + + /** + * Verifies a GetAutoMigrationConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAutoMigrationConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetAutoMigrationConfigRequest; + + /** + * Creates a plain object from a GetAutoMigrationConfigRequest message. Also converts values to other types if specified. + * @param message GetAutoMigrationConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GetAutoMigrationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAutoMigrationConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAutoMigrationConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutoMigrationConfig. */ + interface IAutoMigrationConfig { + + /** AutoMigrationConfig name */ + name?: (string|null); + + /** AutoMigrationConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AutoMigrationConfig autoMigrationEnabled */ + autoMigrationEnabled?: (boolean|null); + } + + /** Represents an AutoMigrationConfig. */ + class AutoMigrationConfig implements IAutoMigrationConfig { + + /** + * Constructs a new AutoMigrationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IAutoMigrationConfig); + + /** AutoMigrationConfig name. */ + public name: string; + + /** AutoMigrationConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AutoMigrationConfig autoMigrationEnabled. */ + public autoMigrationEnabled: boolean; + + /** + * Creates a new AutoMigrationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoMigrationConfig instance + */ + public static create(properties?: google.cloud.config.v1.IAutoMigrationConfig): google.cloud.config.v1.AutoMigrationConfig; + + /** + * Encodes the specified AutoMigrationConfig message. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. + * @param message AutoMigrationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IAutoMigrationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoMigrationConfig message, length delimited. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. + * @param message AutoMigrationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IAutoMigrationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoMigrationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoMigrationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.AutoMigrationConfig; + + /** + * Decodes an AutoMigrationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoMigrationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.AutoMigrationConfig; + + /** + * Verifies an AutoMigrationConfig message. + * @param message Plain 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 AutoMigrationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoMigrationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.AutoMigrationConfig; + + /** + * Creates a plain object from an AutoMigrationConfig message. Also converts values to other types if specified. + * @param message AutoMigrationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.AutoMigrationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoMigrationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoMigrationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAutoMigrationConfigRequest. */ + interface IUpdateAutoMigrationConfigRequest { + + /** UpdateAutoMigrationConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAutoMigrationConfigRequest autoMigrationConfig */ + autoMigrationConfig?: (google.cloud.config.v1.IAutoMigrationConfig|null); + } + + /** Represents an UpdateAutoMigrationConfigRequest. */ + class UpdateAutoMigrationConfigRequest implements IUpdateAutoMigrationConfigRequest { + + /** + * Constructs a new UpdateAutoMigrationConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest); + + /** UpdateAutoMigrationConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAutoMigrationConfigRequest autoMigrationConfig. */ + public autoMigrationConfig?: (google.cloud.config.v1.IAutoMigrationConfig|null); + + /** + * Creates a new UpdateAutoMigrationConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAutoMigrationConfigRequest instance + */ + public static create(properties?: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; + + /** + * Encodes the specified UpdateAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. + * @param message UpdateAutoMigrationConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. + * @param message UpdateAutoMigrationConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; + + /** + * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; + + /** + * Verifies an UpdateAutoMigrationConfigRequest message. + * @param message Plain 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 UpdateAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAutoMigrationConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; + + /** + * Creates a plain object from an UpdateAutoMigrationConfigRequest message. Also converts values to other types if specified. + * @param message UpdateAutoMigrationConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.UpdateAutoMigrationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAutoMigrationConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAutoMigrationConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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. */ + 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 }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @throws {Error} If the payload is not 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.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @throws {Error} If the payload 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.FieldInfo; + + /** + * Verifies a FieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** 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); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|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; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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 { + + /** 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|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[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * 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 }; + + /** + * 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; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a 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.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is 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.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 { + + /** 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_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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 { + + /** 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 }; + + /** + * 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; + } + } + + /** 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions 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 features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions 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 features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** 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 }; + + /** + * 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 { + + /** 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 deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** 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 }; + + /** + * 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. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** 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 }; + + /** + * 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 { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a 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.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is 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.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** 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 features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** 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 }; + + /** + * 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. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|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 deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** 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 }; + + /** + * 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. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (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 features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: 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 }; + + /** + * 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. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** 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); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** 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 }; + + /** + * 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. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** 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 }; + + /** + * 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 { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 { + + /** 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 }; + + /** + * 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; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** 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 }; + + /** + * 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 { + + /** 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 }; + + /** + * 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; + } + } + + /** 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 }; + + /** + * 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 { + + /** 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); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|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; + + /** 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 + * @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 }; + + /** + * 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 + } + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|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|Buffer|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 }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an 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 }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + 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 }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + + /** + * Verifies a ListValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of 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 }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-cloud-config/protos/protos.js b/owl-bot-staging/google-cloud-config/protos/protos.js new file mode 100644 index 00000000000..b818a1c3234 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/protos/protos.js @@ -0,0 +1,43640 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_config_protos || ($protobuf.roots._google_cloud_config_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.config = (function() { + + /** + * Namespace config. + * @memberof google.cloud + * @namespace + */ + var config = {}; + + config.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.config + * @namespace + */ + var v1 = {}; + + v1.Config = (function() { + + /** + * Constructs a new Config service. + * @memberof google.cloud.config.v1 + * @classdesc Represents a Config + * @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 Config(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Config.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Config; + + /** + * Creates new Config service using the specified rpc implementation. + * @function create + * @memberof google.cloud.config.v1.Config + * @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 {Config} RPC service. Useful where requests and/or responses are streamed. + */ + Config.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listDeployments}. + * @memberof google.cloud.config.v1.Config + * @typedef ListDeploymentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ListDeploymentsResponse} [response] ListDeploymentsResponse + */ + + /** + * Calls ListDeployments. + * @function listDeployments + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object + * @param {google.cloud.config.v1.Config.ListDeploymentsCallback} callback Node-style callback called with the error, if any, and ListDeploymentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.listDeployments = function listDeployments(request, callback) { + return this.rpcCall(listDeployments, $root.google.cloud.config.v1.ListDeploymentsRequest, $root.google.cloud.config.v1.ListDeploymentsResponse, request, callback); + }, "name", { value: "ListDeployments" }); + + /** + * Calls ListDeployments. + * @function listDeployments + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getDeployment}. + * @memberof google.cloud.config.v1.Config + * @typedef GetDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.Deployment} [response] Deployment + */ + + /** + * Calls GetDeployment. + * @function getDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetDeploymentRequest} request GetDeploymentRequest message or plain object + * @param {google.cloud.config.v1.Config.GetDeploymentCallback} callback Node-style callback called with the error, if any, and Deployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getDeployment = function getDeployment(request, callback) { + return this.rpcCall(getDeployment, $root.google.cloud.config.v1.GetDeploymentRequest, $root.google.cloud.config.v1.Deployment, request, callback); + }, "name", { value: "GetDeployment" }); + + /** + * Calls GetDeployment. + * @function getDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetDeploymentRequest} request GetDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|createDeployment}. + * @memberof google.cloud.config.v1.Config + * @typedef CreateDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateDeployment. + * @function createDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.ICreateDeploymentRequest} request CreateDeploymentRequest message or plain object + * @param {google.cloud.config.v1.Config.CreateDeploymentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.createDeployment = function createDeployment(request, callback) { + return this.rpcCall(createDeployment, $root.google.cloud.config.v1.CreateDeploymentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDeployment" }); + + /** + * Calls CreateDeployment. + * @function createDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.ICreateDeploymentRequest} request CreateDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|updateDeployment}. + * @memberof google.cloud.config.v1.Config + * @typedef UpdateDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDeployment. + * @function updateDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IUpdateDeploymentRequest} request UpdateDeploymentRequest message or plain object + * @param {google.cloud.config.v1.Config.UpdateDeploymentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.updateDeployment = function updateDeployment(request, callback) { + return this.rpcCall(updateDeployment, $root.google.cloud.config.v1.UpdateDeploymentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDeployment" }); + + /** + * Calls UpdateDeployment. + * @function updateDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IUpdateDeploymentRequest} request UpdateDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|deleteDeployment}. + * @memberof google.cloud.config.v1.Config + * @typedef DeleteDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteDeployment. + * @function deleteDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IDeleteDeploymentRequest} request DeleteDeploymentRequest message or plain object + * @param {google.cloud.config.v1.Config.DeleteDeploymentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.deleteDeployment = function deleteDeployment(request, callback) { + return this.rpcCall(deleteDeployment, $root.google.cloud.config.v1.DeleteDeploymentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDeployment" }); + + /** + * Calls DeleteDeployment. + * @function deleteDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IDeleteDeploymentRequest} request DeleteDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listRevisions}. + * @memberof google.cloud.config.v1.Config + * @typedef ListRevisionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ListRevisionsResponse} [response] ListRevisionsResponse + */ + + /** + * Calls ListRevisions. + * @function listRevisions + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListRevisionsRequest} request ListRevisionsRequest message or plain object + * @param {google.cloud.config.v1.Config.ListRevisionsCallback} callback Node-style callback called with the error, if any, and ListRevisionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.listRevisions = function listRevisions(request, callback) { + return this.rpcCall(listRevisions, $root.google.cloud.config.v1.ListRevisionsRequest, $root.google.cloud.config.v1.ListRevisionsResponse, request, callback); + }, "name", { value: "ListRevisions" }); + + /** + * Calls ListRevisions. + * @function listRevisions + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListRevisionsRequest} request ListRevisionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getRevision}. + * @memberof google.cloud.config.v1.Config + * @typedef GetRevisionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.Revision} [response] Revision + */ + + /** + * Calls GetRevision. + * @function getRevision + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetRevisionRequest} request GetRevisionRequest message or plain object + * @param {google.cloud.config.v1.Config.GetRevisionCallback} callback Node-style callback called with the error, if any, and Revision + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getRevision = function getRevision(request, callback) { + return this.rpcCall(getRevision, $root.google.cloud.config.v1.GetRevisionRequest, $root.google.cloud.config.v1.Revision, request, callback); + }, "name", { value: "GetRevision" }); + + /** + * Calls GetRevision. + * @function getRevision + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetRevisionRequest} request GetRevisionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getResource}. + * @memberof google.cloud.config.v1.Config + * @typedef GetResourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.Resource} [response] Resource + */ + + /** + * Calls GetResource. + * @function getResource + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetResourceRequest} request GetResourceRequest message or plain object + * @param {google.cloud.config.v1.Config.GetResourceCallback} callback Node-style callback called with the error, if any, and Resource + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getResource = function getResource(request, callback) { + return this.rpcCall(getResource, $root.google.cloud.config.v1.GetResourceRequest, $root.google.cloud.config.v1.Resource, request, callback); + }, "name", { value: "GetResource" }); + + /** + * Calls GetResource. + * @function getResource + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetResourceRequest} request GetResourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listResources}. + * @memberof google.cloud.config.v1.Config + * @typedef ListResourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ListResourcesResponse} [response] ListResourcesResponse + */ + + /** + * Calls ListResources. + * @function listResources + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListResourcesRequest} request ListResourcesRequest message or plain object + * @param {google.cloud.config.v1.Config.ListResourcesCallback} callback Node-style callback called with the error, if any, and ListResourcesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.listResources = function listResources(request, callback) { + return this.rpcCall(listResources, $root.google.cloud.config.v1.ListResourcesRequest, $root.google.cloud.config.v1.ListResourcesResponse, request, callback); + }, "name", { value: "ListResources" }); + + /** + * Calls ListResources. + * @function listResources + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListResourcesRequest} request ListResourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|exportDeploymentStatefile}. + * @memberof google.cloud.config.v1.Config + * @typedef ExportDeploymentStatefileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.Statefile} [response] Statefile + */ + + /** + * Calls ExportDeploymentStatefile. + * @function exportDeploymentStatefile + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest} request ExportDeploymentStatefileRequest message or plain object + * @param {google.cloud.config.v1.Config.ExportDeploymentStatefileCallback} callback Node-style callback called with the error, if any, and Statefile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.exportDeploymentStatefile = function exportDeploymentStatefile(request, callback) { + return this.rpcCall(exportDeploymentStatefile, $root.google.cloud.config.v1.ExportDeploymentStatefileRequest, $root.google.cloud.config.v1.Statefile, request, callback); + }, "name", { value: "ExportDeploymentStatefile" }); + + /** + * Calls ExportDeploymentStatefile. + * @function exportDeploymentStatefile + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest} request ExportDeploymentStatefileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|exportRevisionStatefile}. + * @memberof google.cloud.config.v1.Config + * @typedef ExportRevisionStatefileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.Statefile} [response] Statefile + */ + + /** + * Calls ExportRevisionStatefile. + * @function exportRevisionStatefile + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IExportRevisionStatefileRequest} request ExportRevisionStatefileRequest message or plain object + * @param {google.cloud.config.v1.Config.ExportRevisionStatefileCallback} callback Node-style callback called with the error, if any, and Statefile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.exportRevisionStatefile = function exportRevisionStatefile(request, callback) { + return this.rpcCall(exportRevisionStatefile, $root.google.cloud.config.v1.ExportRevisionStatefileRequest, $root.google.cloud.config.v1.Statefile, request, callback); + }, "name", { value: "ExportRevisionStatefile" }); + + /** + * Calls ExportRevisionStatefile. + * @function exportRevisionStatefile + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IExportRevisionStatefileRequest} request ExportRevisionStatefileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|importStatefile}. + * @memberof google.cloud.config.v1.Config + * @typedef ImportStatefileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.Statefile} [response] Statefile + */ + + /** + * Calls ImportStatefile. + * @function importStatefile + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IImportStatefileRequest} request ImportStatefileRequest message or plain object + * @param {google.cloud.config.v1.Config.ImportStatefileCallback} callback Node-style callback called with the error, if any, and Statefile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.importStatefile = function importStatefile(request, callback) { + return this.rpcCall(importStatefile, $root.google.cloud.config.v1.ImportStatefileRequest, $root.google.cloud.config.v1.Statefile, request, callback); + }, "name", { value: "ImportStatefile" }); + + /** + * Calls ImportStatefile. + * @function importStatefile + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IImportStatefileRequest} request ImportStatefileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|deleteStatefile}. + * @memberof google.cloud.config.v1.Config + * @typedef DeleteStatefileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteStatefile. + * @function deleteStatefile + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IDeleteStatefileRequest} request DeleteStatefileRequest message or plain object + * @param {google.cloud.config.v1.Config.DeleteStatefileCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.deleteStatefile = function deleteStatefile(request, callback) { + return this.rpcCall(deleteStatefile, $root.google.cloud.config.v1.DeleteStatefileRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteStatefile" }); + + /** + * Calls DeleteStatefile. + * @function deleteStatefile + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IDeleteStatefileRequest} request DeleteStatefileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|lockDeployment}. + * @memberof google.cloud.config.v1.Config + * @typedef LockDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls LockDeployment. + * @function lockDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.ILockDeploymentRequest} request LockDeploymentRequest message or plain object + * @param {google.cloud.config.v1.Config.LockDeploymentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.lockDeployment = function lockDeployment(request, callback) { + return this.rpcCall(lockDeployment, $root.google.cloud.config.v1.LockDeploymentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "LockDeployment" }); + + /** + * Calls LockDeployment. + * @function lockDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.ILockDeploymentRequest} request LockDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|unlockDeployment}. + * @memberof google.cloud.config.v1.Config + * @typedef UnlockDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UnlockDeployment. + * @function unlockDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IUnlockDeploymentRequest} request UnlockDeploymentRequest message or plain object + * @param {google.cloud.config.v1.Config.UnlockDeploymentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.unlockDeployment = function unlockDeployment(request, callback) { + return this.rpcCall(unlockDeployment, $root.google.cloud.config.v1.UnlockDeploymentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UnlockDeployment" }); + + /** + * Calls UnlockDeployment. + * @function unlockDeployment + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IUnlockDeploymentRequest} request UnlockDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|exportLockInfo}. + * @memberof google.cloud.config.v1.Config + * @typedef ExportLockInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.LockInfo} [response] LockInfo + */ + + /** + * Calls ExportLockInfo. + * @function exportLockInfo + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IExportLockInfoRequest} request ExportLockInfoRequest message or plain object + * @param {google.cloud.config.v1.Config.ExportLockInfoCallback} callback Node-style callback called with the error, if any, and LockInfo + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.exportLockInfo = function exportLockInfo(request, callback) { + return this.rpcCall(exportLockInfo, $root.google.cloud.config.v1.ExportLockInfoRequest, $root.google.cloud.config.v1.LockInfo, request, callback); + }, "name", { value: "ExportLockInfo" }); + + /** + * Calls ExportLockInfo. + * @function exportLockInfo + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IExportLockInfoRequest} request ExportLockInfoRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|createPreview}. + * @memberof google.cloud.config.v1.Config + * @typedef CreatePreviewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreatePreview. + * @function createPreview + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.ICreatePreviewRequest} request CreatePreviewRequest message or plain object + * @param {google.cloud.config.v1.Config.CreatePreviewCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.createPreview = function createPreview(request, callback) { + return this.rpcCall(createPreview, $root.google.cloud.config.v1.CreatePreviewRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreatePreview" }); + + /** + * Calls CreatePreview. + * @function createPreview + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.ICreatePreviewRequest} request CreatePreviewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getPreview}. + * @memberof google.cloud.config.v1.Config + * @typedef GetPreviewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.Preview} [response] Preview + */ + + /** + * Calls GetPreview. + * @function getPreview + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetPreviewRequest} request GetPreviewRequest message or plain object + * @param {google.cloud.config.v1.Config.GetPreviewCallback} callback Node-style callback called with the error, if any, and Preview + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getPreview = function getPreview(request, callback) { + return this.rpcCall(getPreview, $root.google.cloud.config.v1.GetPreviewRequest, $root.google.cloud.config.v1.Preview, request, callback); + }, "name", { value: "GetPreview" }); + + /** + * Calls GetPreview. + * @function getPreview + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetPreviewRequest} request GetPreviewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listPreviews}. + * @memberof google.cloud.config.v1.Config + * @typedef ListPreviewsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ListPreviewsResponse} [response] ListPreviewsResponse + */ + + /** + * Calls ListPreviews. + * @function listPreviews + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListPreviewsRequest} request ListPreviewsRequest message or plain object + * @param {google.cloud.config.v1.Config.ListPreviewsCallback} callback Node-style callback called with the error, if any, and ListPreviewsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.listPreviews = function listPreviews(request, callback) { + return this.rpcCall(listPreviews, $root.google.cloud.config.v1.ListPreviewsRequest, $root.google.cloud.config.v1.ListPreviewsResponse, request, callback); + }, "name", { value: "ListPreviews" }); + + /** + * Calls ListPreviews. + * @function listPreviews + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListPreviewsRequest} request ListPreviewsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|deletePreview}. + * @memberof google.cloud.config.v1.Config + * @typedef DeletePreviewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeletePreview. + * @function deletePreview + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IDeletePreviewRequest} request DeletePreviewRequest message or plain object + * @param {google.cloud.config.v1.Config.DeletePreviewCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.deletePreview = function deletePreview(request, callback) { + return this.rpcCall(deletePreview, $root.google.cloud.config.v1.DeletePreviewRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeletePreview" }); + + /** + * Calls DeletePreview. + * @function deletePreview + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IDeletePreviewRequest} request DeletePreviewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|exportPreviewResult}. + * @memberof google.cloud.config.v1.Config + * @typedef ExportPreviewResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ExportPreviewResultResponse} [response] ExportPreviewResultResponse + */ + + /** + * Calls ExportPreviewResult. + * @function exportPreviewResult + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IExportPreviewResultRequest} request ExportPreviewResultRequest message or plain object + * @param {google.cloud.config.v1.Config.ExportPreviewResultCallback} callback Node-style callback called with the error, if any, and ExportPreviewResultResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.exportPreviewResult = function exportPreviewResult(request, callback) { + return this.rpcCall(exportPreviewResult, $root.google.cloud.config.v1.ExportPreviewResultRequest, $root.google.cloud.config.v1.ExportPreviewResultResponse, request, callback); + }, "name", { value: "ExportPreviewResult" }); + + /** + * Calls ExportPreviewResult. + * @function exportPreviewResult + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IExportPreviewResultRequest} request ExportPreviewResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listTerraformVersions}. + * @memberof google.cloud.config.v1.Config + * @typedef ListTerraformVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ListTerraformVersionsResponse} [response] ListTerraformVersionsResponse + */ + + /** + * Calls ListTerraformVersions. + * @function listTerraformVersions + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListTerraformVersionsRequest} request ListTerraformVersionsRequest message or plain object + * @param {google.cloud.config.v1.Config.ListTerraformVersionsCallback} callback Node-style callback called with the error, if any, and ListTerraformVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.listTerraformVersions = function listTerraformVersions(request, callback) { + return this.rpcCall(listTerraformVersions, $root.google.cloud.config.v1.ListTerraformVersionsRequest, $root.google.cloud.config.v1.ListTerraformVersionsResponse, request, callback); + }, "name", { value: "ListTerraformVersions" }); + + /** + * Calls ListTerraformVersions. + * @function listTerraformVersions + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListTerraformVersionsRequest} request ListTerraformVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getTerraformVersion}. + * @memberof google.cloud.config.v1.Config + * @typedef GetTerraformVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.TerraformVersion} [response] TerraformVersion + */ + + /** + * Calls GetTerraformVersion. + * @function getTerraformVersion + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetTerraformVersionRequest} request GetTerraformVersionRequest message or plain object + * @param {google.cloud.config.v1.Config.GetTerraformVersionCallback} callback Node-style callback called with the error, if any, and TerraformVersion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getTerraformVersion = function getTerraformVersion(request, callback) { + return this.rpcCall(getTerraformVersion, $root.google.cloud.config.v1.GetTerraformVersionRequest, $root.google.cloud.config.v1.TerraformVersion, request, callback); + }, "name", { value: "GetTerraformVersion" }); + + /** + * Calls GetTerraformVersion. + * @function getTerraformVersion + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetTerraformVersionRequest} request GetTerraformVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listResourceChanges}. + * @memberof google.cloud.config.v1.Config + * @typedef ListResourceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ListResourceChangesResponse} [response] ListResourceChangesResponse + */ + + /** + * Calls ListResourceChanges. + * @function listResourceChanges + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListResourceChangesRequest} request ListResourceChangesRequest message or plain object + * @param {google.cloud.config.v1.Config.ListResourceChangesCallback} callback Node-style callback called with the error, if any, and ListResourceChangesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.listResourceChanges = function listResourceChanges(request, callback) { + return this.rpcCall(listResourceChanges, $root.google.cloud.config.v1.ListResourceChangesRequest, $root.google.cloud.config.v1.ListResourceChangesResponse, request, callback); + }, "name", { value: "ListResourceChanges" }); + + /** + * Calls ListResourceChanges. + * @function listResourceChanges + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListResourceChangesRequest} request ListResourceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getResourceChange}. + * @memberof google.cloud.config.v1.Config + * @typedef GetResourceChangeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ResourceChange} [response] ResourceChange + */ + + /** + * Calls GetResourceChange. + * @function getResourceChange + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetResourceChangeRequest} request GetResourceChangeRequest message or plain object + * @param {google.cloud.config.v1.Config.GetResourceChangeCallback} callback Node-style callback called with the error, if any, and ResourceChange + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getResourceChange = function getResourceChange(request, callback) { + return this.rpcCall(getResourceChange, $root.google.cloud.config.v1.GetResourceChangeRequest, $root.google.cloud.config.v1.ResourceChange, request, callback); + }, "name", { value: "GetResourceChange" }); + + /** + * Calls GetResourceChange. + * @function getResourceChange + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetResourceChangeRequest} request GetResourceChangeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listResourceDrifts}. + * @memberof google.cloud.config.v1.Config + * @typedef ListResourceDriftsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ListResourceDriftsResponse} [response] ListResourceDriftsResponse + */ + + /** + * Calls ListResourceDrifts. + * @function listResourceDrifts + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListResourceDriftsRequest} request ListResourceDriftsRequest message or plain object + * @param {google.cloud.config.v1.Config.ListResourceDriftsCallback} callback Node-style callback called with the error, if any, and ListResourceDriftsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.listResourceDrifts = function listResourceDrifts(request, callback) { + return this.rpcCall(listResourceDrifts, $root.google.cloud.config.v1.ListResourceDriftsRequest, $root.google.cloud.config.v1.ListResourceDriftsResponse, request, callback); + }, "name", { value: "ListResourceDrifts" }); + + /** + * Calls ListResourceDrifts. + * @function listResourceDrifts + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListResourceDriftsRequest} request ListResourceDriftsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getResourceDrift}. + * @memberof google.cloud.config.v1.Config + * @typedef GetResourceDriftCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ResourceDrift} [response] ResourceDrift + */ + + /** + * Calls GetResourceDrift. + * @function getResourceDrift + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetResourceDriftRequest} request GetResourceDriftRequest message or plain object + * @param {google.cloud.config.v1.Config.GetResourceDriftCallback} callback Node-style callback called with the error, if any, and ResourceDrift + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getResourceDrift = function getResourceDrift(request, callback) { + return this.rpcCall(getResourceDrift, $root.google.cloud.config.v1.GetResourceDriftRequest, $root.google.cloud.config.v1.ResourceDrift, request, callback); + }, "name", { value: "GetResourceDrift" }); + + /** + * Calls GetResourceDrift. + * @function getResourceDrift + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetResourceDriftRequest} request GetResourceDriftRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getAutoMigrationConfig}. + * @memberof google.cloud.config.v1.Config + * @typedef GetAutoMigrationConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.AutoMigrationConfig} [response] AutoMigrationConfig + */ + + /** + * Calls GetAutoMigrationConfig. + * @function getAutoMigrationConfig + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} request GetAutoMigrationConfigRequest message or plain object + * @param {google.cloud.config.v1.Config.GetAutoMigrationConfigCallback} callback Node-style callback called with the error, if any, and AutoMigrationConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getAutoMigrationConfig = function getAutoMigrationConfig(request, callback) { + return this.rpcCall(getAutoMigrationConfig, $root.google.cloud.config.v1.GetAutoMigrationConfigRequest, $root.google.cloud.config.v1.AutoMigrationConfig, request, callback); + }, "name", { value: "GetAutoMigrationConfig" }); + + /** + * Calls GetAutoMigrationConfig. + * @function getAutoMigrationConfig + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} request GetAutoMigrationConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|updateAutoMigrationConfig}. + * @memberof google.cloud.config.v1.Config + * @typedef UpdateAutoMigrationConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAutoMigrationConfig. + * @function updateAutoMigrationConfig + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} request UpdateAutoMigrationConfigRequest message or plain object + * @param {google.cloud.config.v1.Config.UpdateAutoMigrationConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.updateAutoMigrationConfig = function updateAutoMigrationConfig(request, callback) { + return this.rpcCall(updateAutoMigrationConfig, $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAutoMigrationConfig" }); + + /** + * Calls UpdateAutoMigrationConfig. + * @function updateAutoMigrationConfig + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} request UpdateAutoMigrationConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Config; + })(); + + /** + * QuotaValidation enum. + * @name google.cloud.config.v1.QuotaValidation + * @enum {number} + * @property {number} QUOTA_VALIDATION_UNSPECIFIED=0 QUOTA_VALIDATION_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} ENFORCED=2 ENFORCED value + */ + v1.QuotaValidation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "QUOTA_VALIDATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "ENFORCED"] = 2; + return values; + })(); + + v1.Deployment = (function() { + + /** + * Properties of a Deployment. + * @memberof google.cloud.config.v1 + * @interface IDeployment + * @property {google.cloud.config.v1.ITerraformBlueprint|null} [terraformBlueprint] Deployment terraformBlueprint + * @property {string|null} [name] Deployment name + * @property {google.protobuf.ITimestamp|null} [createTime] Deployment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Deployment updateTime + * @property {Object.|null} [labels] Deployment labels + * @property {google.cloud.config.v1.Deployment.State|null} [state] Deployment state + * @property {string|null} [latestRevision] Deployment latestRevision + * @property {string|null} [stateDetail] Deployment stateDetail + * @property {google.cloud.config.v1.Deployment.ErrorCode|null} [errorCode] Deployment errorCode + * @property {google.cloud.config.v1.IApplyResults|null} [deleteResults] Deployment deleteResults + * @property {string|null} [deleteBuild] Deployment deleteBuild + * @property {string|null} [deleteLogs] Deployment deleteLogs + * @property {Array.|null} [tfErrors] Deployment tfErrors + * @property {string|null} [errorLogs] Deployment errorLogs + * @property {string|null} [artifactsGcsBucket] Deployment artifactsGcsBucket + * @property {string|null} [serviceAccount] Deployment serviceAccount + * @property {boolean|null} [importExistingResources] Deployment importExistingResources + * @property {string|null} [workerPool] Deployment workerPool + * @property {google.cloud.config.v1.Deployment.LockState|null} [lockState] Deployment lockState + * @property {string|null} [tfVersionConstraint] Deployment tfVersionConstraint + * @property {string|null} [tfVersion] Deployment tfVersion + * @property {google.cloud.config.v1.QuotaValidation|null} [quotaValidation] Deployment quotaValidation + * @property {Object.|null} [annotations] Deployment annotations + * @property {google.cloud.config.v1.IProviderConfig|null} [providerConfig] Deployment providerConfig + */ + + /** + * Constructs a new Deployment. + * @memberof google.cloud.config.v1 + * @classdesc Represents a Deployment. + * @implements IDeployment + * @constructor + * @param {google.cloud.config.v1.IDeployment=} [properties] Properties to set + */ + function Deployment(properties) { + this.labels = {}; + this.tfErrors = []; + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Deployment terraformBlueprint. + * @member {google.cloud.config.v1.ITerraformBlueprint|null|undefined} terraformBlueprint + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.terraformBlueprint = null; + + /** + * Deployment name. + * @member {string} name + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.name = ""; + + /** + * Deployment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.createTime = null; + + /** + * Deployment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.updateTime = null; + + /** + * Deployment labels. + * @member {Object.} labels + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.labels = $util.emptyObject; + + /** + * Deployment state. + * @member {google.cloud.config.v1.Deployment.State} state + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.state = 0; + + /** + * Deployment latestRevision. + * @member {string} latestRevision + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.latestRevision = ""; + + /** + * Deployment stateDetail. + * @member {string} stateDetail + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.stateDetail = ""; + + /** + * Deployment errorCode. + * @member {google.cloud.config.v1.Deployment.ErrorCode} errorCode + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.errorCode = 0; + + /** + * Deployment deleteResults. + * @member {google.cloud.config.v1.IApplyResults|null|undefined} deleteResults + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.deleteResults = null; + + /** + * Deployment deleteBuild. + * @member {string} deleteBuild + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.deleteBuild = ""; + + /** + * Deployment deleteLogs. + * @member {string} deleteLogs + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.deleteLogs = ""; + + /** + * Deployment tfErrors. + * @member {Array.} tfErrors + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.tfErrors = $util.emptyArray; + + /** + * Deployment errorLogs. + * @member {string} errorLogs + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.errorLogs = ""; + + /** + * Deployment artifactsGcsBucket. + * @member {string|null|undefined} artifactsGcsBucket + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.artifactsGcsBucket = null; + + /** + * Deployment serviceAccount. + * @member {string|null|undefined} serviceAccount + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.serviceAccount = null; + + /** + * Deployment importExistingResources. + * @member {boolean|null|undefined} importExistingResources + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.importExistingResources = null; + + /** + * Deployment workerPool. + * @member {string|null|undefined} workerPool + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.workerPool = null; + + /** + * Deployment lockState. + * @member {google.cloud.config.v1.Deployment.LockState} lockState + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.lockState = 0; + + /** + * Deployment tfVersionConstraint. + * @member {string|null|undefined} tfVersionConstraint + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.tfVersionConstraint = null; + + /** + * Deployment tfVersion. + * @member {string} tfVersion + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.tfVersion = ""; + + /** + * Deployment quotaValidation. + * @member {google.cloud.config.v1.QuotaValidation} quotaValidation + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.quotaValidation = 0; + + /** + * Deployment annotations. + * @member {Object.} annotations + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.annotations = $util.emptyObject; + + /** + * Deployment providerConfig. + * @member {google.cloud.config.v1.IProviderConfig|null|undefined} providerConfig + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Deployment.prototype.providerConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Deployment blueprint. + * @member {"terraformBlueprint"|undefined} blueprint + * @memberof google.cloud.config.v1.Deployment + * @instance + */ + Object.defineProperty(Deployment.prototype, "blueprint", { + get: $util.oneOfGetter($oneOfFields = ["terraformBlueprint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Deployment.prototype, "_artifactsGcsBucket", { + get: $util.oneOfGetter($oneOfFields = ["artifactsGcsBucket"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Deployment.prototype, "_serviceAccount", { + get: $util.oneOfGetter($oneOfFields = ["serviceAccount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Deployment.prototype, "_importExistingResources", { + get: $util.oneOfGetter($oneOfFields = ["importExistingResources"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Deployment.prototype, "_workerPool", { + get: $util.oneOfGetter($oneOfFields = ["workerPool"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Deployment.prototype, "_tfVersionConstraint", { + get: $util.oneOfGetter($oneOfFields = ["tfVersionConstraint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Deployment instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.Deployment + * @static + * @param {google.cloud.config.v1.IDeployment=} [properties] Properties to set + * @returns {google.cloud.config.v1.Deployment} Deployment instance + */ + Deployment.create = function create(properties) { + return new Deployment(properties); + }; + + /** + * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.config.v1.Deployment.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.Deployment + * @static + * @param {google.cloud.config.v1.IDeployment} message Deployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deployment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.terraformBlueprint != null && Object.hasOwnProperty.call(message, "terraformBlueprint")) + $root.google.cloud.config.v1.TerraformBlueprint.encode(message.terraformBlueprint, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.latestRevision != null && Object.hasOwnProperty.call(message, "latestRevision")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.latestRevision); + if (message.deleteResults != null && Object.hasOwnProperty.call(message, "deleteResults")) + $root.google.cloud.config.v1.ApplyResults.encode(message.deleteResults, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.stateDetail != null && Object.hasOwnProperty.call(message, "stateDetail")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.stateDetail); + if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.errorCode); + if (message.deleteBuild != null && Object.hasOwnProperty.call(message, "deleteBuild")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.deleteBuild); + if (message.deleteLogs != null && Object.hasOwnProperty.call(message, "deleteLogs")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.deleteLogs); + if (message.tfErrors != null && message.tfErrors.length) + for (var i = 0; i < message.tfErrors.length; ++i) + $root.google.cloud.config.v1.TerraformError.encode(message.tfErrors[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.errorLogs != null && Object.hasOwnProperty.call(message, "errorLogs")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.errorLogs); + if (message.artifactsGcsBucket != null && Object.hasOwnProperty.call(message, "artifactsGcsBucket")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.artifactsGcsBucket); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.serviceAccount); + if (message.importExistingResources != null && Object.hasOwnProperty.call(message, "importExistingResources")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.importExistingResources); + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.workerPool); + if (message.lockState != null && Object.hasOwnProperty.call(message, "lockState")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.lockState); + if (message.tfVersionConstraint != null && Object.hasOwnProperty.call(message, "tfVersionConstraint")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.tfVersionConstraint); + if (message.tfVersion != null && Object.hasOwnProperty.call(message, "tfVersion")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.tfVersion); + if (message.quotaValidation != null && Object.hasOwnProperty.call(message, "quotaValidation")) + writer.uint32(/* id 23, wireType 0 =*/184).int32(message.quotaValidation); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 24, wireType 2 =*/194).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.providerConfig != null && Object.hasOwnProperty.call(message, "providerConfig")) + $root.google.cloud.config.v1.ProviderConfig.encode(message.providerConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.config.v1.Deployment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.Deployment + * @static + * @param {google.cloud.config.v1.IDeployment} message Deployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deployment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deployment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.Deployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.Deployment} Deployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deployment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.Deployment(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 6: { + message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 7: { + message.latestRevision = reader.string(); + break; + } + case 9: { + message.stateDetail = reader.string(); + break; + } + case 10: { + message.errorCode = reader.int32(); + break; + } + case 8: { + message.deleteResults = $root.google.cloud.config.v1.ApplyResults.decode(reader, reader.uint32()); + break; + } + case 11: { + message.deleteBuild = reader.string(); + break; + } + case 12: { + message.deleteLogs = reader.string(); + break; + } + case 13: { + if (!(message.tfErrors && message.tfErrors.length)) + message.tfErrors = []; + message.tfErrors.push($root.google.cloud.config.v1.TerraformError.decode(reader, reader.uint32())); + break; + } + case 14: { + message.errorLogs = reader.string(); + break; + } + case 15: { + message.artifactsGcsBucket = reader.string(); + break; + } + case 16: { + message.serviceAccount = reader.string(); + break; + } + case 17: { + message.importExistingResources = reader.bool(); + break; + } + case 19: { + message.workerPool = reader.string(); + break; + } + case 20: { + message.lockState = reader.int32(); + break; + } + case 21: { + message.tfVersionConstraint = reader.string(); + break; + } + case 22: { + message.tfVersion = reader.string(); + break; + } + case 23: { + message.quotaValidation = reader.int32(); + break; + } + case 24: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + } + case 25: { + message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Deployment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.Deployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.Deployment} Deployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deployment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Deployment message. + * @function verify + * @memberof google.cloud.config.v1.Deployment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deployment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { + properties.blueprint = 1; + { + var error = $root.google.cloud.config.v1.TerraformBlueprint.verify(message.terraformBlueprint); + if (error) + return "terraformBlueprint." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.latestRevision != null && message.hasOwnProperty("latestRevision")) + if (!$util.isString(message.latestRevision)) + return "latestRevision: string expected"; + if (message.stateDetail != null && message.hasOwnProperty("stateDetail")) + if (!$util.isString(message.stateDetail)) + return "stateDetail: string expected"; + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + switch (message.errorCode) { + default: + return "errorCode: enum value expected"; + case 0: + case 1: + case 3: + case 5: + case 6: + case 7: + case 8: + case 10: + break; + } + if (message.deleteResults != null && message.hasOwnProperty("deleteResults")) { + var error = $root.google.cloud.config.v1.ApplyResults.verify(message.deleteResults); + if (error) + return "deleteResults." + error; + } + if (message.deleteBuild != null && message.hasOwnProperty("deleteBuild")) + if (!$util.isString(message.deleteBuild)) + return "deleteBuild: string expected"; + if (message.deleteLogs != null && message.hasOwnProperty("deleteLogs")) + if (!$util.isString(message.deleteLogs)) + return "deleteLogs: string expected"; + if (message.tfErrors != null && message.hasOwnProperty("tfErrors")) { + if (!Array.isArray(message.tfErrors)) + return "tfErrors: array expected"; + for (var i = 0; i < message.tfErrors.length; ++i) { + var error = $root.google.cloud.config.v1.TerraformError.verify(message.tfErrors[i]); + if (error) + return "tfErrors." + error; + } + } + if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) + if (!$util.isString(message.errorLogs)) + return "errorLogs: string expected"; + if (message.artifactsGcsBucket != null && message.hasOwnProperty("artifactsGcsBucket")) { + properties._artifactsGcsBucket = 1; + if (!$util.isString(message.artifactsGcsBucket)) + return "artifactsGcsBucket: string expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { + properties._serviceAccount = 1; + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + } + if (message.importExistingResources != null && message.hasOwnProperty("importExistingResources")) { + properties._importExistingResources = 1; + if (typeof message.importExistingResources !== "boolean") + return "importExistingResources: boolean expected"; + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) { + properties._workerPool = 1; + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + } + if (message.lockState != null && message.hasOwnProperty("lockState")) + switch (message.lockState) { + default: + return "lockState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) { + properties._tfVersionConstraint = 1; + if (!$util.isString(message.tfVersionConstraint)) + return "tfVersionConstraint: string expected"; + } + if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) + if (!$util.isString(message.tfVersion)) + return "tfVersion: string expected"; + if (message.quotaValidation != null && message.hasOwnProperty("quotaValidation")) + switch (message.quotaValidation) { + default: + return "quotaValidation: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) { + var error = $root.google.cloud.config.v1.ProviderConfig.verify(message.providerConfig); + if (error) + return "providerConfig." + error; + } + return null; + }; + + /** + * Creates a Deployment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.Deployment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.Deployment} Deployment + */ + Deployment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.Deployment) + return object; + var message = new $root.google.cloud.config.v1.Deployment(); + if (object.terraformBlueprint != null) { + if (typeof object.terraformBlueprint !== "object") + throw TypeError(".google.cloud.config.v1.Deployment.terraformBlueprint: object expected"); + message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.fromObject(object.terraformBlueprint); + } + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.config.v1.Deployment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.config.v1.Deployment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.config.v1.Deployment.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "SUSPENDED": + case 6: + message.state = 6; + break; + case "DELETED": + case 7: + message.state = 7; + break; + } + if (object.latestRevision != null) + message.latestRevision = String(object.latestRevision); + if (object.stateDetail != null) + message.stateDetail = String(object.stateDetail); + switch (object.errorCode) { + default: + if (typeof object.errorCode === "number") { + message.errorCode = object.errorCode; + break; + } + break; + case "ERROR_CODE_UNSPECIFIED": + case 0: + message.errorCode = 0; + break; + case "REVISION_FAILED": + case 1: + message.errorCode = 1; + break; + case "CLOUD_BUILD_PERMISSION_DENIED": + case 3: + message.errorCode = 3; + break; + case "DELETE_BUILD_API_FAILED": + case 5: + message.errorCode = 5; + break; + case "DELETE_BUILD_RUN_FAILED": + case 6: + message.errorCode = 6; + break; + case "BUCKET_CREATION_PERMISSION_DENIED": + case 7: + message.errorCode = 7; + break; + case "BUCKET_CREATION_FAILED": + case 8: + message.errorCode = 8; + break; + case "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": + case 10: + message.errorCode = 10; + break; + } + if (object.deleteResults != null) { + if (typeof object.deleteResults !== "object") + throw TypeError(".google.cloud.config.v1.Deployment.deleteResults: object expected"); + message.deleteResults = $root.google.cloud.config.v1.ApplyResults.fromObject(object.deleteResults); + } + if (object.deleteBuild != null) + message.deleteBuild = String(object.deleteBuild); + if (object.deleteLogs != null) + message.deleteLogs = String(object.deleteLogs); + if (object.tfErrors) { + if (!Array.isArray(object.tfErrors)) + throw TypeError(".google.cloud.config.v1.Deployment.tfErrors: array expected"); + message.tfErrors = []; + for (var i = 0; i < object.tfErrors.length; ++i) { + if (typeof object.tfErrors[i] !== "object") + throw TypeError(".google.cloud.config.v1.Deployment.tfErrors: object expected"); + message.tfErrors[i] = $root.google.cloud.config.v1.TerraformError.fromObject(object.tfErrors[i]); + } + } + if (object.errorLogs != null) + message.errorLogs = String(object.errorLogs); + if (object.artifactsGcsBucket != null) + message.artifactsGcsBucket = String(object.artifactsGcsBucket); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.importExistingResources != null) + message.importExistingResources = Boolean(object.importExistingResources); + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + switch (object.lockState) { + default: + if (typeof object.lockState === "number") { + message.lockState = object.lockState; + break; + } + break; + case "LOCK_STATE_UNSPECIFIED": + case 0: + message.lockState = 0; + break; + case "LOCKED": + case 1: + message.lockState = 1; + break; + case "UNLOCKED": + case 2: + message.lockState = 2; + break; + case "LOCKING": + case 3: + message.lockState = 3; + break; + case "UNLOCKING": + case 4: + message.lockState = 4; + break; + case "LOCK_FAILED": + case 5: + message.lockState = 5; + break; + case "UNLOCK_FAILED": + case 6: + message.lockState = 6; + break; + } + if (object.tfVersionConstraint != null) + message.tfVersionConstraint = String(object.tfVersionConstraint); + if (object.tfVersion != null) + message.tfVersion = String(object.tfVersion); + switch (object.quotaValidation) { + default: + if (typeof object.quotaValidation === "number") { + message.quotaValidation = object.quotaValidation; + break; + } + break; + case "QUOTA_VALIDATION_UNSPECIFIED": + case 0: + message.quotaValidation = 0; + break; + case "ENABLED": + case 1: + message.quotaValidation = 1; + break; + case "ENFORCED": + case 2: + message.quotaValidation = 2; + break; + } + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.config.v1.Deployment.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.providerConfig != null) { + if (typeof object.providerConfig !== "object") + throw TypeError(".google.cloud.config.v1.Deployment.providerConfig: object expected"); + message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.fromObject(object.providerConfig); + } + return message; + }; + + /** + * Creates a plain object from a Deployment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.Deployment + * @static + * @param {google.cloud.config.v1.Deployment} message Deployment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deployment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tfErrors = []; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.latestRevision = ""; + object.deleteResults = null; + object.stateDetail = ""; + object.errorCode = options.enums === String ? "ERROR_CODE_UNSPECIFIED" : 0; + object.deleteBuild = ""; + object.deleteLogs = ""; + object.errorLogs = ""; + object.lockState = options.enums === String ? "LOCK_STATE_UNSPECIFIED" : 0; + object.tfVersion = ""; + object.quotaValidation = options.enums === String ? "QUOTA_VALIDATION_UNSPECIFIED" : 0; + object.providerConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.config.v1.Deployment.State[message.state] === undefined ? message.state : $root.google.cloud.config.v1.Deployment.State[message.state] : message.state; + if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { + object.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.toObject(message.terraformBlueprint, options); + if (options.oneofs) + object.blueprint = "terraformBlueprint"; + } + if (message.latestRevision != null && message.hasOwnProperty("latestRevision")) + object.latestRevision = message.latestRevision; + if (message.deleteResults != null && message.hasOwnProperty("deleteResults")) + object.deleteResults = $root.google.cloud.config.v1.ApplyResults.toObject(message.deleteResults, options); + if (message.stateDetail != null && message.hasOwnProperty("stateDetail")) + object.stateDetail = message.stateDetail; + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + object.errorCode = options.enums === String ? $root.google.cloud.config.v1.Deployment.ErrorCode[message.errorCode] === undefined ? message.errorCode : $root.google.cloud.config.v1.Deployment.ErrorCode[message.errorCode] : message.errorCode; + if (message.deleteBuild != null && message.hasOwnProperty("deleteBuild")) + object.deleteBuild = message.deleteBuild; + if (message.deleteLogs != null && message.hasOwnProperty("deleteLogs")) + object.deleteLogs = message.deleteLogs; + if (message.tfErrors && message.tfErrors.length) { + object.tfErrors = []; + for (var j = 0; j < message.tfErrors.length; ++j) + object.tfErrors[j] = $root.google.cloud.config.v1.TerraformError.toObject(message.tfErrors[j], options); + } + if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) + object.errorLogs = message.errorLogs; + if (message.artifactsGcsBucket != null && message.hasOwnProperty("artifactsGcsBucket")) { + object.artifactsGcsBucket = message.artifactsGcsBucket; + if (options.oneofs) + object._artifactsGcsBucket = "artifactsGcsBucket"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { + object.serviceAccount = message.serviceAccount; + if (options.oneofs) + object._serviceAccount = "serviceAccount"; + } + if (message.importExistingResources != null && message.hasOwnProperty("importExistingResources")) { + object.importExistingResources = message.importExistingResources; + if (options.oneofs) + object._importExistingResources = "importExistingResources"; + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) { + object.workerPool = message.workerPool; + if (options.oneofs) + object._workerPool = "workerPool"; + } + if (message.lockState != null && message.hasOwnProperty("lockState")) + object.lockState = options.enums === String ? $root.google.cloud.config.v1.Deployment.LockState[message.lockState] === undefined ? message.lockState : $root.google.cloud.config.v1.Deployment.LockState[message.lockState] : message.lockState; + if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) { + object.tfVersionConstraint = message.tfVersionConstraint; + if (options.oneofs) + object._tfVersionConstraint = "tfVersionConstraint"; + } + if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) + object.tfVersion = message.tfVersion; + if (message.quotaValidation != null && message.hasOwnProperty("quotaValidation")) + object.quotaValidation = options.enums === String ? $root.google.cloud.config.v1.QuotaValidation[message.quotaValidation] === undefined ? message.quotaValidation : $root.google.cloud.config.v1.QuotaValidation[message.quotaValidation] : message.quotaValidation; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) + object.providerConfig = $root.google.cloud.config.v1.ProviderConfig.toObject(message.providerConfig, options); + return object; + }; + + /** + * Converts this Deployment to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.Deployment + * @instance + * @returns {Object.} JSON object + */ + Deployment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Deployment + * @function getTypeUrl + * @memberof google.cloud.config.v1.Deployment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Deployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.Deployment"; + }; + + /** + * State enum. + * @name google.cloud.config.v1.Deployment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=4 DELETING value + * @property {number} FAILED=5 FAILED value + * @property {number} SUSPENDED=6 SUSPENDED value + * @property {number} DELETED=7 DELETED value + */ + Deployment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "SUSPENDED"] = 6; + values[valuesById[7] = "DELETED"] = 7; + return values; + })(); + + /** + * ErrorCode enum. + * @name google.cloud.config.v1.Deployment.ErrorCode + * @enum {number} + * @property {number} ERROR_CODE_UNSPECIFIED=0 ERROR_CODE_UNSPECIFIED value + * @property {number} REVISION_FAILED=1 REVISION_FAILED value + * @property {number} CLOUD_BUILD_PERMISSION_DENIED=3 CLOUD_BUILD_PERMISSION_DENIED value + * @property {number} DELETE_BUILD_API_FAILED=5 DELETE_BUILD_API_FAILED value + * @property {number} DELETE_BUILD_RUN_FAILED=6 DELETE_BUILD_RUN_FAILED value + * @property {number} BUCKET_CREATION_PERMISSION_DENIED=7 BUCKET_CREATION_PERMISSION_DENIED value + * @property {number} BUCKET_CREATION_FAILED=8 BUCKET_CREATION_FAILED value + * @property {number} EXTERNAL_VALUE_SOURCE_IMPORT_FAILED=10 EXTERNAL_VALUE_SOURCE_IMPORT_FAILED value + */ + Deployment.ErrorCode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERROR_CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "REVISION_FAILED"] = 1; + values[valuesById[3] = "CLOUD_BUILD_PERMISSION_DENIED"] = 3; + values[valuesById[5] = "DELETE_BUILD_API_FAILED"] = 5; + values[valuesById[6] = "DELETE_BUILD_RUN_FAILED"] = 6; + values[valuesById[7] = "BUCKET_CREATION_PERMISSION_DENIED"] = 7; + values[valuesById[8] = "BUCKET_CREATION_FAILED"] = 8; + values[valuesById[10] = "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED"] = 10; + return values; + })(); + + /** + * LockState enum. + * @name google.cloud.config.v1.Deployment.LockState + * @enum {number} + * @property {number} LOCK_STATE_UNSPECIFIED=0 LOCK_STATE_UNSPECIFIED value + * @property {number} LOCKED=1 LOCKED value + * @property {number} UNLOCKED=2 UNLOCKED value + * @property {number} LOCKING=3 LOCKING value + * @property {number} UNLOCKING=4 UNLOCKING value + * @property {number} LOCK_FAILED=5 LOCK_FAILED value + * @property {number} UNLOCK_FAILED=6 UNLOCK_FAILED value + */ + Deployment.LockState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCK_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOCKED"] = 1; + values[valuesById[2] = "UNLOCKED"] = 2; + values[valuesById[3] = "LOCKING"] = 3; + values[valuesById[4] = "UNLOCKING"] = 4; + values[valuesById[5] = "LOCK_FAILED"] = 5; + values[valuesById[6] = "UNLOCK_FAILED"] = 6; + return values; + })(); + + return Deployment; + })(); + + v1.TerraformBlueprint = (function() { + + /** + * Properties of a TerraformBlueprint. + * @memberof google.cloud.config.v1 + * @interface ITerraformBlueprint + * @property {string|null} [gcsSource] TerraformBlueprint gcsSource + * @property {google.cloud.config.v1.IGitSource|null} [gitSource] TerraformBlueprint gitSource + * @property {Object.|null} [inputValues] TerraformBlueprint inputValues + */ + + /** + * Constructs a new TerraformBlueprint. + * @memberof google.cloud.config.v1 + * @classdesc Represents a TerraformBlueprint. + * @implements ITerraformBlueprint + * @constructor + * @param {google.cloud.config.v1.ITerraformBlueprint=} [properties] Properties to set + */ + function TerraformBlueprint(properties) { + this.inputValues = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerraformBlueprint gcsSource. + * @member {string|null|undefined} gcsSource + * @memberof google.cloud.config.v1.TerraformBlueprint + * @instance + */ + TerraformBlueprint.prototype.gcsSource = null; + + /** + * TerraformBlueprint gitSource. + * @member {google.cloud.config.v1.IGitSource|null|undefined} gitSource + * @memberof google.cloud.config.v1.TerraformBlueprint + * @instance + */ + TerraformBlueprint.prototype.gitSource = null; + + /** + * TerraformBlueprint inputValues. + * @member {Object.} inputValues + * @memberof google.cloud.config.v1.TerraformBlueprint + * @instance + */ + TerraformBlueprint.prototype.inputValues = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TerraformBlueprint source. + * @member {"gcsSource"|"gitSource"|undefined} source + * @memberof google.cloud.config.v1.TerraformBlueprint + * @instance + */ + Object.defineProperty(TerraformBlueprint.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource", "gitSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TerraformBlueprint instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.TerraformBlueprint + * @static + * @param {google.cloud.config.v1.ITerraformBlueprint=} [properties] Properties to set + * @returns {google.cloud.config.v1.TerraformBlueprint} TerraformBlueprint instance + */ + TerraformBlueprint.create = function create(properties) { + return new TerraformBlueprint(properties); + }; + + /** + * Encodes the specified TerraformBlueprint message. Does not implicitly {@link google.cloud.config.v1.TerraformBlueprint.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.TerraformBlueprint + * @static + * @param {google.cloud.config.v1.ITerraformBlueprint} message TerraformBlueprint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerraformBlueprint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsSource); + if (message.gitSource != null && Object.hasOwnProperty.call(message, "gitSource")) + $root.google.cloud.config.v1.GitSource.encode(message.gitSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inputValues != null && Object.hasOwnProperty.call(message, "inputValues")) + for (var keys = Object.keys(message.inputValues), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.config.v1.TerraformVariable.encode(message.inputValues[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified TerraformBlueprint message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformBlueprint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.TerraformBlueprint + * @static + * @param {google.cloud.config.v1.ITerraformBlueprint} message TerraformBlueprint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerraformBlueprint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerraformBlueprint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.TerraformBlueprint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.TerraformBlueprint} TerraformBlueprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerraformBlueprint.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.TerraformBlueprint(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gcsSource = reader.string(); + break; + } + case 2: { + message.gitSource = $root.google.cloud.config.v1.GitSource.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.inputValues === $util.emptyObject) + message.inputValues = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.config.v1.TerraformVariable.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.inputValues[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TerraformBlueprint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.TerraformBlueprint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.TerraformBlueprint} TerraformBlueprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerraformBlueprint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerraformBlueprint message. + * @function verify + * @memberof google.cloud.config.v1.TerraformBlueprint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerraformBlueprint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + if (!$util.isString(message.gcsSource)) + return "gcsSource: string expected"; + } + if (message.gitSource != null && message.hasOwnProperty("gitSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.config.v1.GitSource.verify(message.gitSource); + if (error) + return "gitSource." + error; + } + } + if (message.inputValues != null && message.hasOwnProperty("inputValues")) { + if (!$util.isObject(message.inputValues)) + return "inputValues: object expected"; + var key = Object.keys(message.inputValues); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.config.v1.TerraformVariable.verify(message.inputValues[key[i]]); + if (error) + return "inputValues." + error; + } + } + return null; + }; + + /** + * Creates a TerraformBlueprint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.TerraformBlueprint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.TerraformBlueprint} TerraformBlueprint + */ + TerraformBlueprint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.TerraformBlueprint) + return object; + var message = new $root.google.cloud.config.v1.TerraformBlueprint(); + if (object.gcsSource != null) + message.gcsSource = String(object.gcsSource); + if (object.gitSource != null) { + if (typeof object.gitSource !== "object") + throw TypeError(".google.cloud.config.v1.TerraformBlueprint.gitSource: object expected"); + message.gitSource = $root.google.cloud.config.v1.GitSource.fromObject(object.gitSource); + } + if (object.inputValues) { + if (typeof object.inputValues !== "object") + throw TypeError(".google.cloud.config.v1.TerraformBlueprint.inputValues: object expected"); + message.inputValues = {}; + for (var keys = Object.keys(object.inputValues), i = 0; i < keys.length; ++i) { + if (typeof object.inputValues[keys[i]] !== "object") + throw TypeError(".google.cloud.config.v1.TerraformBlueprint.inputValues: object expected"); + message.inputValues[keys[i]] = $root.google.cloud.config.v1.TerraformVariable.fromObject(object.inputValues[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a TerraformBlueprint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.TerraformBlueprint + * @static + * @param {google.cloud.config.v1.TerraformBlueprint} message TerraformBlueprint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerraformBlueprint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.inputValues = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = message.gcsSource; + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.gitSource != null && message.hasOwnProperty("gitSource")) { + object.gitSource = $root.google.cloud.config.v1.GitSource.toObject(message.gitSource, options); + if (options.oneofs) + object.source = "gitSource"; + } + var keys2; + if (message.inputValues && (keys2 = Object.keys(message.inputValues)).length) { + object.inputValues = {}; + for (var j = 0; j < keys2.length; ++j) + object.inputValues[keys2[j]] = $root.google.cloud.config.v1.TerraformVariable.toObject(message.inputValues[keys2[j]], options); + } + return object; + }; + + /** + * Converts this TerraformBlueprint to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.TerraformBlueprint + * @instance + * @returns {Object.} JSON object + */ + TerraformBlueprint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerraformBlueprint + * @function getTypeUrl + * @memberof google.cloud.config.v1.TerraformBlueprint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerraformBlueprint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.TerraformBlueprint"; + }; + + return TerraformBlueprint; + })(); + + v1.TerraformVariable = (function() { + + /** + * Properties of a TerraformVariable. + * @memberof google.cloud.config.v1 + * @interface ITerraformVariable + * @property {google.protobuf.IValue|null} [inputValue] TerraformVariable inputValue + */ + + /** + * Constructs a new TerraformVariable. + * @memberof google.cloud.config.v1 + * @classdesc Represents a TerraformVariable. + * @implements ITerraformVariable + * @constructor + * @param {google.cloud.config.v1.ITerraformVariable=} [properties] Properties to set + */ + function TerraformVariable(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerraformVariable inputValue. + * @member {google.protobuf.IValue|null|undefined} inputValue + * @memberof google.cloud.config.v1.TerraformVariable + * @instance + */ + TerraformVariable.prototype.inputValue = null; + + /** + * Creates a new TerraformVariable instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.TerraformVariable + * @static + * @param {google.cloud.config.v1.ITerraformVariable=} [properties] Properties to set + * @returns {google.cloud.config.v1.TerraformVariable} TerraformVariable instance + */ + TerraformVariable.create = function create(properties) { + return new TerraformVariable(properties); + }; + + /** + * Encodes the specified TerraformVariable message. Does not implicitly {@link google.cloud.config.v1.TerraformVariable.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.TerraformVariable + * @static + * @param {google.cloud.config.v1.ITerraformVariable} message TerraformVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerraformVariable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputValue != null && Object.hasOwnProperty.call(message, "inputValue")) + $root.google.protobuf.Value.encode(message.inputValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TerraformVariable message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformVariable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.TerraformVariable + * @static + * @param {google.cloud.config.v1.ITerraformVariable} message TerraformVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerraformVariable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerraformVariable message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.TerraformVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.TerraformVariable} TerraformVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerraformVariable.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.TerraformVariable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 5: { + message.inputValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TerraformVariable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.TerraformVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.TerraformVariable} TerraformVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerraformVariable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerraformVariable message. + * @function verify + * @memberof google.cloud.config.v1.TerraformVariable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerraformVariable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputValue != null && message.hasOwnProperty("inputValue")) { + var error = $root.google.protobuf.Value.verify(message.inputValue); + if (error) + return "inputValue." + error; + } + return null; + }; + + /** + * Creates a TerraformVariable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.TerraformVariable + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.TerraformVariable} TerraformVariable + */ + TerraformVariable.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.TerraformVariable) + return object; + var message = new $root.google.cloud.config.v1.TerraformVariable(); + if (object.inputValue != null) { + if (typeof object.inputValue !== "object") + throw TypeError(".google.cloud.config.v1.TerraformVariable.inputValue: object expected"); + message.inputValue = $root.google.protobuf.Value.fromObject(object.inputValue); + } + return message; + }; + + /** + * Creates a plain object from a TerraformVariable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.TerraformVariable + * @static + * @param {google.cloud.config.v1.TerraformVariable} message TerraformVariable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerraformVariable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.inputValue = null; + if (message.inputValue != null && message.hasOwnProperty("inputValue")) + object.inputValue = $root.google.protobuf.Value.toObject(message.inputValue, options); + return object; + }; + + /** + * Converts this TerraformVariable to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.TerraformVariable + * @instance + * @returns {Object.} JSON object + */ + TerraformVariable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerraformVariable + * @function getTypeUrl + * @memberof google.cloud.config.v1.TerraformVariable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerraformVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.TerraformVariable"; + }; + + return TerraformVariable; + })(); + + v1.ApplyResults = (function() { + + /** + * Properties of an ApplyResults. + * @memberof google.cloud.config.v1 + * @interface IApplyResults + * @property {string|null} [content] ApplyResults content + * @property {string|null} [artifacts] ApplyResults artifacts + * @property {Object.|null} [outputs] ApplyResults outputs + */ + + /** + * Constructs a new ApplyResults. + * @memberof google.cloud.config.v1 + * @classdesc Represents an ApplyResults. + * @implements IApplyResults + * @constructor + * @param {google.cloud.config.v1.IApplyResults=} [properties] Properties to set + */ + function ApplyResults(properties) { + this.outputs = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ApplyResults content. + * @member {string} content + * @memberof google.cloud.config.v1.ApplyResults + * @instance + */ + ApplyResults.prototype.content = ""; + + /** + * ApplyResults artifacts. + * @member {string} artifacts + * @memberof google.cloud.config.v1.ApplyResults + * @instance + */ + ApplyResults.prototype.artifacts = ""; + + /** + * ApplyResults outputs. + * @member {Object.} outputs + * @memberof google.cloud.config.v1.ApplyResults + * @instance + */ + ApplyResults.prototype.outputs = $util.emptyObject; + + /** + * Creates a new ApplyResults instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ApplyResults + * @static + * @param {google.cloud.config.v1.IApplyResults=} [properties] Properties to set + * @returns {google.cloud.config.v1.ApplyResults} ApplyResults instance + */ + ApplyResults.create = function create(properties) { + return new ApplyResults(properties); + }; + + /** + * Encodes the specified ApplyResults message. Does not implicitly {@link google.cloud.config.v1.ApplyResults.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ApplyResults + * @static + * @param {google.cloud.config.v1.IApplyResults} message ApplyResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApplyResults.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.artifacts != null && Object.hasOwnProperty.call(message, "artifacts")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifacts); + if (message.outputs != null && Object.hasOwnProperty.call(message, "outputs")) + for (var keys = Object.keys(message.outputs), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.config.v1.TerraformOutput.encode(message.outputs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ApplyResults message, length delimited. Does not implicitly {@link google.cloud.config.v1.ApplyResults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ApplyResults + * @static + * @param {google.cloud.config.v1.IApplyResults} message ApplyResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApplyResults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApplyResults message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ApplyResults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ApplyResults} ApplyResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApplyResults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ApplyResults(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.content = reader.string(); + break; + } + case 2: { + message.artifacts = reader.string(); + break; + } + case 3: { + if (message.outputs === $util.emptyObject) + message.outputs = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.config.v1.TerraformOutput.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.outputs[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApplyResults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ApplyResults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ApplyResults} ApplyResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApplyResults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApplyResults message. + * @function verify + * @memberof google.cloud.config.v1.ApplyResults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApplyResults.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.artifacts != null && message.hasOwnProperty("artifacts")) + if (!$util.isString(message.artifacts)) + return "artifacts: string expected"; + if (message.outputs != null && message.hasOwnProperty("outputs")) { + if (!$util.isObject(message.outputs)) + return "outputs: object expected"; + var key = Object.keys(message.outputs); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.config.v1.TerraformOutput.verify(message.outputs[key[i]]); + if (error) + return "outputs." + error; + } + } + return null; + }; + + /** + * Creates an ApplyResults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ApplyResults + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ApplyResults} ApplyResults + */ + ApplyResults.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ApplyResults) + return object; + var message = new $root.google.cloud.config.v1.ApplyResults(); + if (object.content != null) + message.content = String(object.content); + if (object.artifacts != null) + message.artifacts = String(object.artifacts); + if (object.outputs) { + if (typeof object.outputs !== "object") + throw TypeError(".google.cloud.config.v1.ApplyResults.outputs: object expected"); + message.outputs = {}; + for (var keys = Object.keys(object.outputs), i = 0; i < keys.length; ++i) { + if (typeof object.outputs[keys[i]] !== "object") + throw TypeError(".google.cloud.config.v1.ApplyResults.outputs: object expected"); + message.outputs[keys[i]] = $root.google.cloud.config.v1.TerraformOutput.fromObject(object.outputs[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from an ApplyResults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ApplyResults + * @static + * @param {google.cloud.config.v1.ApplyResults} message ApplyResults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApplyResults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.outputs = {}; + if (options.defaults) { + object.content = ""; + object.artifacts = ""; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.artifacts != null && message.hasOwnProperty("artifacts")) + object.artifacts = message.artifacts; + var keys2; + if (message.outputs && (keys2 = Object.keys(message.outputs)).length) { + object.outputs = {}; + for (var j = 0; j < keys2.length; ++j) + object.outputs[keys2[j]] = $root.google.cloud.config.v1.TerraformOutput.toObject(message.outputs[keys2[j]], options); + } + return object; + }; + + /** + * Converts this ApplyResults to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ApplyResults + * @instance + * @returns {Object.} JSON object + */ + ApplyResults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ApplyResults + * @function getTypeUrl + * @memberof google.cloud.config.v1.ApplyResults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApplyResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ApplyResults"; + }; + + return ApplyResults; + })(); + + v1.TerraformOutput = (function() { + + /** + * Properties of a TerraformOutput. + * @memberof google.cloud.config.v1 + * @interface ITerraformOutput + * @property {boolean|null} [sensitive] TerraformOutput sensitive + * @property {google.protobuf.IValue|null} [value] TerraformOutput value + */ + + /** + * Constructs a new TerraformOutput. + * @memberof google.cloud.config.v1 + * @classdesc Represents a TerraformOutput. + * @implements ITerraformOutput + * @constructor + * @param {google.cloud.config.v1.ITerraformOutput=} [properties] Properties to set + */ + function TerraformOutput(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerraformOutput sensitive. + * @member {boolean} sensitive + * @memberof google.cloud.config.v1.TerraformOutput + * @instance + */ + TerraformOutput.prototype.sensitive = false; + + /** + * TerraformOutput value. + * @member {google.protobuf.IValue|null|undefined} value + * @memberof google.cloud.config.v1.TerraformOutput + * @instance + */ + TerraformOutput.prototype.value = null; + + /** + * Creates a new TerraformOutput instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.TerraformOutput + * @static + * @param {google.cloud.config.v1.ITerraformOutput=} [properties] Properties to set + * @returns {google.cloud.config.v1.TerraformOutput} TerraformOutput instance + */ + TerraformOutput.create = function create(properties) { + return new TerraformOutput(properties); + }; + + /** + * Encodes the specified TerraformOutput message. Does not implicitly {@link google.cloud.config.v1.TerraformOutput.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.TerraformOutput + * @static + * @param {google.cloud.config.v1.ITerraformOutput} message TerraformOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerraformOutput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sensitive != null && Object.hasOwnProperty.call(message, "sensitive")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.sensitive); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TerraformOutput message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformOutput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.TerraformOutput + * @static + * @param {google.cloud.config.v1.ITerraformOutput} message TerraformOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerraformOutput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerraformOutput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.TerraformOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.TerraformOutput} TerraformOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerraformOutput.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.TerraformOutput(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sensitive = reader.bool(); + break; + } + case 2: { + message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TerraformOutput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.TerraformOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.TerraformOutput} TerraformOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerraformOutput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerraformOutput message. + * @function verify + * @memberof google.cloud.config.v1.TerraformOutput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerraformOutput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sensitive != null && message.hasOwnProperty("sensitive")) + if (typeof message.sensitive !== "boolean") + return "sensitive: boolean expected"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.protobuf.Value.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a TerraformOutput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.TerraformOutput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.TerraformOutput} TerraformOutput + */ + TerraformOutput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.TerraformOutput) + return object; + var message = new $root.google.cloud.config.v1.TerraformOutput(); + if (object.sensitive != null) + message.sensitive = Boolean(object.sensitive); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.config.v1.TerraformOutput.value: object expected"); + message.value = $root.google.protobuf.Value.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a TerraformOutput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.TerraformOutput + * @static + * @param {google.cloud.config.v1.TerraformOutput} message TerraformOutput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerraformOutput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sensitive = false; + object.value = null; + } + if (message.sensitive != null && message.hasOwnProperty("sensitive")) + object.sensitive = message.sensitive; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.protobuf.Value.toObject(message.value, options); + return object; + }; + + /** + * Converts this TerraformOutput to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.TerraformOutput + * @instance + * @returns {Object.} JSON object + */ + TerraformOutput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerraformOutput + * @function getTypeUrl + * @memberof google.cloud.config.v1.TerraformOutput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerraformOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.TerraformOutput"; + }; + + return TerraformOutput; + })(); + + v1.ListDeploymentsRequest = (function() { + + /** + * Properties of a ListDeploymentsRequest. + * @memberof google.cloud.config.v1 + * @interface IListDeploymentsRequest + * @property {string|null} [parent] ListDeploymentsRequest parent + * @property {number|null} [pageSize] ListDeploymentsRequest pageSize + * @property {string|null} [pageToken] ListDeploymentsRequest pageToken + * @property {string|null} [filter] ListDeploymentsRequest filter + * @property {string|null} [orderBy] ListDeploymentsRequest orderBy + */ + + /** + * Constructs a new ListDeploymentsRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListDeploymentsRequest. + * @implements IListDeploymentsRequest + * @constructor + * @param {google.cloud.config.v1.IListDeploymentsRequest=} [properties] Properties to set + */ + function ListDeploymentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeploymentsRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @instance + */ + ListDeploymentsRequest.prototype.parent = ""; + + /** + * ListDeploymentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @instance + */ + ListDeploymentsRequest.prototype.pageSize = 0; + + /** + * ListDeploymentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @instance + */ + ListDeploymentsRequest.prototype.pageToken = ""; + + /** + * ListDeploymentsRequest filter. + * @member {string} filter + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @instance + */ + ListDeploymentsRequest.prototype.filter = ""; + + /** + * ListDeploymentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @instance + */ + ListDeploymentsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDeploymentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @static + * @param {google.cloud.config.v1.IListDeploymentsRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListDeploymentsRequest} ListDeploymentsRequest instance + */ + ListDeploymentsRequest.create = function create(properties) { + return new ListDeploymentsRequest(properties); + }; + + /** + * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @static + * @param {google.cloud.config.v1.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeploymentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @static + * @param {google.cloud.config.v1.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeploymentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListDeploymentsRequest} ListDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeploymentsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListDeploymentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListDeploymentsRequest} ListDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeploymentsRequest message. + * @function verify + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeploymentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListDeploymentsRequest} ListDeploymentsRequest + */ + ListDeploymentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListDeploymentsRequest) + return object; + var message = new $root.google.cloud.config.v1.ListDeploymentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @static + * @param {google.cloud.config.v1.ListDeploymentsRequest} message ListDeploymentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeploymentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListDeploymentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDeploymentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDeploymentsRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListDeploymentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListDeploymentsRequest"; + }; + + return ListDeploymentsRequest; + })(); + + v1.ListDeploymentsResponse = (function() { + + /** + * Properties of a ListDeploymentsResponse. + * @memberof google.cloud.config.v1 + * @interface IListDeploymentsResponse + * @property {Array.|null} [deployments] ListDeploymentsResponse deployments + * @property {string|null} [nextPageToken] ListDeploymentsResponse nextPageToken + * @property {Array.|null} [unreachable] ListDeploymentsResponse unreachable + */ + + /** + * Constructs a new ListDeploymentsResponse. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListDeploymentsResponse. + * @implements IListDeploymentsResponse + * @constructor + * @param {google.cloud.config.v1.IListDeploymentsResponse=} [properties] Properties to set + */ + function ListDeploymentsResponse(properties) { + this.deployments = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeploymentsResponse deployments. + * @member {Array.} deployments + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @instance + */ + ListDeploymentsResponse.prototype.deployments = $util.emptyArray; + + /** + * ListDeploymentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @instance + */ + ListDeploymentsResponse.prototype.nextPageToken = ""; + + /** + * ListDeploymentsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @instance + */ + ListDeploymentsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListDeploymentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @static + * @param {google.cloud.config.v1.IListDeploymentsResponse=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListDeploymentsResponse} ListDeploymentsResponse instance + */ + ListDeploymentsResponse.create = function create(properties) { + return new ListDeploymentsResponse(properties); + }; + + /** + * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @static + * @param {google.cloud.config.v1.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeploymentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deployments != null && message.deployments.length) + for (var i = 0; i < message.deployments.length; ++i) + $root.google.cloud.config.v1.Deployment.encode(message.deployments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @static + * @param {google.cloud.config.v1.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeploymentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListDeploymentsResponse} ListDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeploymentsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListDeploymentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.deployments && message.deployments.length)) + message.deployments = []; + message.deployments.push($root.google.cloud.config.v1.Deployment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListDeploymentsResponse} ListDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeploymentsResponse message. + * @function verify + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeploymentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deployments != null && message.hasOwnProperty("deployments")) { + if (!Array.isArray(message.deployments)) + return "deployments: array expected"; + for (var i = 0; i < message.deployments.length; ++i) { + var error = $root.google.cloud.config.v1.Deployment.verify(message.deployments[i]); + if (error) + return "deployments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListDeploymentsResponse} ListDeploymentsResponse + */ + ListDeploymentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListDeploymentsResponse) + return object; + var message = new $root.google.cloud.config.v1.ListDeploymentsResponse(); + if (object.deployments) { + if (!Array.isArray(object.deployments)) + throw TypeError(".google.cloud.config.v1.ListDeploymentsResponse.deployments: array expected"); + message.deployments = []; + for (var i = 0; i < object.deployments.length; ++i) { + if (typeof object.deployments[i] !== "object") + throw TypeError(".google.cloud.config.v1.ListDeploymentsResponse.deployments: object expected"); + message.deployments[i] = $root.google.cloud.config.v1.Deployment.fromObject(object.deployments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.config.v1.ListDeploymentsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @static + * @param {google.cloud.config.v1.ListDeploymentsResponse} message ListDeploymentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeploymentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.deployments = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.deployments && message.deployments.length) { + object.deployments = []; + for (var j = 0; j < message.deployments.length; ++j) + object.deployments[j] = $root.google.cloud.config.v1.Deployment.toObject(message.deployments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListDeploymentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDeploymentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDeploymentsResponse + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListDeploymentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListDeploymentsResponse"; + }; + + return ListDeploymentsResponse; + })(); + + v1.GetDeploymentRequest = (function() { + + /** + * Properties of a GetDeploymentRequest. + * @memberof google.cloud.config.v1 + * @interface IGetDeploymentRequest + * @property {string|null} [name] GetDeploymentRequest name + */ + + /** + * Constructs a new GetDeploymentRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GetDeploymentRequest. + * @implements IGetDeploymentRequest + * @constructor + * @param {google.cloud.config.v1.IGetDeploymentRequest=} [properties] Properties to set + */ + function GetDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.GetDeploymentRequest + * @instance + */ + GetDeploymentRequest.prototype.name = ""; + + /** + * Creates a new GetDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GetDeploymentRequest + * @static + * @param {google.cloud.config.v1.IGetDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.GetDeploymentRequest} GetDeploymentRequest instance + */ + GetDeploymentRequest.create = function create(properties) { + return new GetDeploymentRequest(properties); + }; + + /** + * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.GetDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GetDeploymentRequest + * @static + * @param {google.cloud.config.v1.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeploymentRequest.encode = function encode(message, writer) { + 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 GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GetDeploymentRequest + * @static + * @param {google.cloud.config.v1.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GetDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GetDeploymentRequest} GetDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeploymentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GetDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GetDeploymentRequest} GetDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDeploymentRequest message. + * @function verify + * @memberof google.cloud.config.v1.GetDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDeploymentRequest.verify = function verify(message) { + if (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 GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GetDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GetDeploymentRequest} GetDeploymentRequest + */ + GetDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GetDeploymentRequest) + return object; + var message = new $root.google.cloud.config.v1.GetDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GetDeploymentRequest + * @static + * @param {google.cloud.config.v1.GetDeploymentRequest} message GetDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDeploymentRequest.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 GetDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GetDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + GetDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.GetDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GetDeploymentRequest"; + }; + + return GetDeploymentRequest; + })(); + + v1.ListRevisionsRequest = (function() { + + /** + * Properties of a ListRevisionsRequest. + * @memberof google.cloud.config.v1 + * @interface IListRevisionsRequest + * @property {string|null} [parent] ListRevisionsRequest parent + * @property {number|null} [pageSize] ListRevisionsRequest pageSize + * @property {string|null} [pageToken] ListRevisionsRequest pageToken + * @property {string|null} [filter] ListRevisionsRequest filter + * @property {string|null} [orderBy] ListRevisionsRequest orderBy + */ + + /** + * Constructs a new ListRevisionsRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListRevisionsRequest. + * @implements IListRevisionsRequest + * @constructor + * @param {google.cloud.config.v1.IListRevisionsRequest=} [properties] Properties to set + */ + function ListRevisionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRevisionsRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @instance + */ + ListRevisionsRequest.prototype.parent = ""; + + /** + * ListRevisionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @instance + */ + ListRevisionsRequest.prototype.pageSize = 0; + + /** + * ListRevisionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @instance + */ + ListRevisionsRequest.prototype.pageToken = ""; + + /** + * ListRevisionsRequest filter. + * @member {string} filter + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @instance + */ + ListRevisionsRequest.prototype.filter = ""; + + /** + * ListRevisionsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @instance + */ + ListRevisionsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListRevisionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @static + * @param {google.cloud.config.v1.IListRevisionsRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListRevisionsRequest} ListRevisionsRequest instance + */ + ListRevisionsRequest.create = function create(properties) { + return new ListRevisionsRequest(properties); + }; + + /** + * Encodes the specified ListRevisionsRequest message. Does not implicitly {@link google.cloud.config.v1.ListRevisionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @static + * @param {google.cloud.config.v1.IListRevisionsRequest} message ListRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRevisionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListRevisionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @static + * @param {google.cloud.config.v1.IListRevisionsRequest} message ListRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRevisionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListRevisionsRequest} ListRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRevisionsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListRevisionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRevisionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListRevisionsRequest} ListRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRevisionsRequest message. + * @function verify + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRevisionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListRevisionsRequest} ListRevisionsRequest + */ + ListRevisionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListRevisionsRequest) + return object; + var message = new $root.google.cloud.config.v1.ListRevisionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListRevisionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @static + * @param {google.cloud.config.v1.ListRevisionsRequest} message ListRevisionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRevisionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListRevisionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListRevisionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRevisionsRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListRevisionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRevisionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListRevisionsRequest"; + }; + + return ListRevisionsRequest; + })(); + + v1.ListRevisionsResponse = (function() { + + /** + * Properties of a ListRevisionsResponse. + * @memberof google.cloud.config.v1 + * @interface IListRevisionsResponse + * @property {Array.|null} [revisions] ListRevisionsResponse revisions + * @property {string|null} [nextPageToken] ListRevisionsResponse nextPageToken + * @property {Array.|null} [unreachable] ListRevisionsResponse unreachable + */ + + /** + * Constructs a new ListRevisionsResponse. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListRevisionsResponse. + * @implements IListRevisionsResponse + * @constructor + * @param {google.cloud.config.v1.IListRevisionsResponse=} [properties] Properties to set + */ + function ListRevisionsResponse(properties) { + this.revisions = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRevisionsResponse revisions. + * @member {Array.} revisions + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @instance + */ + ListRevisionsResponse.prototype.revisions = $util.emptyArray; + + /** + * ListRevisionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @instance + */ + ListRevisionsResponse.prototype.nextPageToken = ""; + + /** + * ListRevisionsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @instance + */ + ListRevisionsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListRevisionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @static + * @param {google.cloud.config.v1.IListRevisionsResponse=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListRevisionsResponse} ListRevisionsResponse instance + */ + ListRevisionsResponse.create = function create(properties) { + return new ListRevisionsResponse(properties); + }; + + /** + * Encodes the specified ListRevisionsResponse message. Does not implicitly {@link google.cloud.config.v1.ListRevisionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @static + * @param {google.cloud.config.v1.IListRevisionsResponse} message ListRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRevisionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.revisions != null && message.revisions.length) + for (var i = 0; i < message.revisions.length; ++i) + $root.google.cloud.config.v1.Revision.encode(message.revisions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListRevisionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @static + * @param {google.cloud.config.v1.IListRevisionsResponse} message ListRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRevisionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListRevisionsResponse} ListRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRevisionsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListRevisionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.revisions && message.revisions.length)) + message.revisions = []; + message.revisions.push($root.google.cloud.config.v1.Revision.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRevisionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListRevisionsResponse} ListRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRevisionsResponse message. + * @function verify + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRevisionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.revisions != null && message.hasOwnProperty("revisions")) { + if (!Array.isArray(message.revisions)) + return "revisions: array expected"; + for (var i = 0; i < message.revisions.length; ++i) { + var error = $root.google.cloud.config.v1.Revision.verify(message.revisions[i]); + if (error) + return "revisions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListRevisionsResponse} ListRevisionsResponse + */ + ListRevisionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListRevisionsResponse) + return object; + var message = new $root.google.cloud.config.v1.ListRevisionsResponse(); + if (object.revisions) { + if (!Array.isArray(object.revisions)) + throw TypeError(".google.cloud.config.v1.ListRevisionsResponse.revisions: array expected"); + message.revisions = []; + for (var i = 0; i < object.revisions.length; ++i) { + if (typeof object.revisions[i] !== "object") + throw TypeError(".google.cloud.config.v1.ListRevisionsResponse.revisions: object expected"); + message.revisions[i] = $root.google.cloud.config.v1.Revision.fromObject(object.revisions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.config.v1.ListRevisionsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListRevisionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @static + * @param {google.cloud.config.v1.ListRevisionsResponse} message ListRevisionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRevisionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.revisions = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.revisions && message.revisions.length) { + object.revisions = []; + for (var j = 0; j < message.revisions.length; ++j) + object.revisions[j] = $root.google.cloud.config.v1.Revision.toObject(message.revisions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListRevisionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListRevisionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRevisionsResponse + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListRevisionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRevisionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListRevisionsResponse"; + }; + + return ListRevisionsResponse; + })(); + + v1.GetRevisionRequest = (function() { + + /** + * Properties of a GetRevisionRequest. + * @memberof google.cloud.config.v1 + * @interface IGetRevisionRequest + * @property {string|null} [name] GetRevisionRequest name + */ + + /** + * Constructs a new GetRevisionRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GetRevisionRequest. + * @implements IGetRevisionRequest + * @constructor + * @param {google.cloud.config.v1.IGetRevisionRequest=} [properties] Properties to set + */ + function GetRevisionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetRevisionRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.GetRevisionRequest + * @instance + */ + GetRevisionRequest.prototype.name = ""; + + /** + * Creates a new GetRevisionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GetRevisionRequest + * @static + * @param {google.cloud.config.v1.IGetRevisionRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.GetRevisionRequest} GetRevisionRequest instance + */ + GetRevisionRequest.create = function create(properties) { + return new GetRevisionRequest(properties); + }; + + /** + * Encodes the specified GetRevisionRequest message. Does not implicitly {@link google.cloud.config.v1.GetRevisionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GetRevisionRequest + * @static + * @param {google.cloud.config.v1.IGetRevisionRequest} message GetRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRevisionRequest.encode = function encode(message, writer) { + 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 GetRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetRevisionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GetRevisionRequest + * @static + * @param {google.cloud.config.v1.IGetRevisionRequest} message GetRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRevisionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GetRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GetRevisionRequest} GetRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRevisionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetRevisionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRevisionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GetRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GetRevisionRequest} GetRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRevisionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRevisionRequest message. + * @function verify + * @memberof google.cloud.config.v1.GetRevisionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRevisionRequest.verify = function verify(message) { + if (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 GetRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GetRevisionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GetRevisionRequest} GetRevisionRequest + */ + GetRevisionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GetRevisionRequest) + return object; + var message = new $root.google.cloud.config.v1.GetRevisionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRevisionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GetRevisionRequest + * @static + * @param {google.cloud.config.v1.GetRevisionRequest} message GetRevisionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRevisionRequest.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 GetRevisionRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GetRevisionRequest + * @instance + * @returns {Object.} JSON object + */ + GetRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetRevisionRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.GetRevisionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GetRevisionRequest"; + }; + + return GetRevisionRequest; + })(); + + v1.CreateDeploymentRequest = (function() { + + /** + * Properties of a CreateDeploymentRequest. + * @memberof google.cloud.config.v1 + * @interface ICreateDeploymentRequest + * @property {string|null} [parent] CreateDeploymentRequest parent + * @property {string|null} [deploymentId] CreateDeploymentRequest deploymentId + * @property {google.cloud.config.v1.IDeployment|null} [deployment] CreateDeploymentRequest deployment + * @property {string|null} [requestId] CreateDeploymentRequest requestId + */ + + /** + * Constructs a new CreateDeploymentRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a CreateDeploymentRequest. + * @implements ICreateDeploymentRequest + * @constructor + * @param {google.cloud.config.v1.ICreateDeploymentRequest=} [properties] Properties to set + */ + function CreateDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDeploymentRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @instance + */ + CreateDeploymentRequest.prototype.parent = ""; + + /** + * CreateDeploymentRequest deploymentId. + * @member {string} deploymentId + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @instance + */ + CreateDeploymentRequest.prototype.deploymentId = ""; + + /** + * CreateDeploymentRequest deployment. + * @member {google.cloud.config.v1.IDeployment|null|undefined} deployment + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @instance + */ + CreateDeploymentRequest.prototype.deployment = null; + + /** + * CreateDeploymentRequest requestId. + * @member {string} requestId + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @instance + */ + CreateDeploymentRequest.prototype.requestId = ""; + + /** + * Creates a new CreateDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @static + * @param {google.cloud.config.v1.ICreateDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.CreateDeploymentRequest} CreateDeploymentRequest instance + */ + CreateDeploymentRequest.create = function create(properties) { + return new CreateDeploymentRequest(properties); + }; + + /** + * Encodes the specified CreateDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.CreateDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @static + * @param {google.cloud.config.v1.ICreateDeploymentRequest} message CreateDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDeploymentRequest.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.deploymentId != null && Object.hasOwnProperty.call(message, "deploymentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deploymentId); + if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) + $root.google.cloud.config.v1.Deployment.encode(message.deployment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.CreateDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @static + * @param {google.cloud.config.v1.ICreateDeploymentRequest} message CreateDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.CreateDeploymentRequest} CreateDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDeploymentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.CreateDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.deploymentId = reader.string(); + break; + } + case 3: { + message.deployment = $root.google.cloud.config.v1.Deployment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.CreateDeploymentRequest} CreateDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDeploymentRequest message. + * @function verify + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDeploymentRequest.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.deploymentId != null && message.hasOwnProperty("deploymentId")) + if (!$util.isString(message.deploymentId)) + return "deploymentId: string expected"; + if (message.deployment != null && message.hasOwnProperty("deployment")) { + var error = $root.google.cloud.config.v1.Deployment.verify(message.deployment); + if (error) + return "deployment." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.CreateDeploymentRequest} CreateDeploymentRequest + */ + CreateDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.CreateDeploymentRequest) + return object; + var message = new $root.google.cloud.config.v1.CreateDeploymentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deploymentId != null) + message.deploymentId = String(object.deploymentId); + if (object.deployment != null) { + if (typeof object.deployment !== "object") + throw TypeError(".google.cloud.config.v1.CreateDeploymentRequest.deployment: object expected"); + message.deployment = $root.google.cloud.config.v1.Deployment.fromObject(object.deployment); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @static + * @param {google.cloud.config.v1.CreateDeploymentRequest} message CreateDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.deploymentId = ""; + object.deployment = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deploymentId != null && message.hasOwnProperty("deploymentId")) + object.deploymentId = message.deploymentId; + if (message.deployment != null && message.hasOwnProperty("deployment")) + object.deployment = $root.google.cloud.config.v1.Deployment.toObject(message.deployment, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.CreateDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.CreateDeploymentRequest"; + }; + + return CreateDeploymentRequest; + })(); + + v1.UpdateDeploymentRequest = (function() { + + /** + * Properties of an UpdateDeploymentRequest. + * @memberof google.cloud.config.v1 + * @interface IUpdateDeploymentRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeploymentRequest updateMask + * @property {google.cloud.config.v1.IDeployment|null} [deployment] UpdateDeploymentRequest deployment + * @property {string|null} [requestId] UpdateDeploymentRequest requestId + */ + + /** + * Constructs a new UpdateDeploymentRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents an UpdateDeploymentRequest. + * @implements IUpdateDeploymentRequest + * @constructor + * @param {google.cloud.config.v1.IUpdateDeploymentRequest=} [properties] Properties to set + */ + function UpdateDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDeploymentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @instance + */ + UpdateDeploymentRequest.prototype.updateMask = null; + + /** + * UpdateDeploymentRequest deployment. + * @member {google.cloud.config.v1.IDeployment|null|undefined} deployment + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @instance + */ + UpdateDeploymentRequest.prototype.deployment = null; + + /** + * UpdateDeploymentRequest requestId. + * @member {string} requestId + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @instance + */ + UpdateDeploymentRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @static + * @param {google.cloud.config.v1.IUpdateDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.UpdateDeploymentRequest} UpdateDeploymentRequest instance + */ + UpdateDeploymentRequest.create = function create(properties) { + return new UpdateDeploymentRequest(properties); + }; + + /** + * Encodes the specified UpdateDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.UpdateDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @static + * @param {google.cloud.config.v1.IUpdateDeploymentRequest} message UpdateDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeploymentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) + $root.google.cloud.config.v1.Deployment.encode(message.deployment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UpdateDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @static + * @param {google.cloud.config.v1.IUpdateDeploymentRequest} message UpdateDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.UpdateDeploymentRequest} UpdateDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeploymentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.UpdateDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.deployment = $root.google.cloud.config.v1.Deployment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.UpdateDeploymentRequest} UpdateDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDeploymentRequest message. + * @function verify + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDeploymentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.deployment != null && message.hasOwnProperty("deployment")) { + var error = $root.google.cloud.config.v1.Deployment.verify(message.deployment); + if (error) + return "deployment." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.UpdateDeploymentRequest} UpdateDeploymentRequest + */ + UpdateDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.UpdateDeploymentRequest) + return object; + var message = new $root.google.cloud.config.v1.UpdateDeploymentRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.config.v1.UpdateDeploymentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.deployment != null) { + if (typeof object.deployment !== "object") + throw TypeError(".google.cloud.config.v1.UpdateDeploymentRequest.deployment: object expected"); + message.deployment = $root.google.cloud.config.v1.Deployment.fromObject(object.deployment); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @static + * @param {google.cloud.config.v1.UpdateDeploymentRequest} message UpdateDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.deployment = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.deployment != null && message.hasOwnProperty("deployment")) + object.deployment = $root.google.cloud.config.v1.Deployment.toObject(message.deployment, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.UpdateDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.UpdateDeploymentRequest"; + }; + + return UpdateDeploymentRequest; + })(); + + v1.DeleteDeploymentRequest = (function() { + + /** + * Properties of a DeleteDeploymentRequest. + * @memberof google.cloud.config.v1 + * @interface IDeleteDeploymentRequest + * @property {string|null} [name] DeleteDeploymentRequest name + * @property {string|null} [requestId] DeleteDeploymentRequest requestId + * @property {boolean|null} [force] DeleteDeploymentRequest force + * @property {google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy|null} [deletePolicy] DeleteDeploymentRequest deletePolicy + */ + + /** + * Constructs a new DeleteDeploymentRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a DeleteDeploymentRequest. + * @implements IDeleteDeploymentRequest + * @constructor + * @param {google.cloud.config.v1.IDeleteDeploymentRequest=} [properties] Properties to set + */ + function DeleteDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @instance + */ + DeleteDeploymentRequest.prototype.name = ""; + + /** + * DeleteDeploymentRequest requestId. + * @member {string} requestId + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @instance + */ + DeleteDeploymentRequest.prototype.requestId = ""; + + /** + * DeleteDeploymentRequest force. + * @member {boolean} force + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @instance + */ + DeleteDeploymentRequest.prototype.force = false; + + /** + * DeleteDeploymentRequest deletePolicy. + * @member {google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy} deletePolicy + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @instance + */ + DeleteDeploymentRequest.prototype.deletePolicy = 0; + + /** + * Creates a new DeleteDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @static + * @param {google.cloud.config.v1.IDeleteDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.DeleteDeploymentRequest} DeleteDeploymentRequest instance + */ + DeleteDeploymentRequest.create = function create(properties) { + return new DeleteDeploymentRequest(properties); + }; + + /** + * Encodes the specified DeleteDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.DeleteDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @static + * @param {google.cloud.config.v1.IDeleteDeploymentRequest} message DeleteDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDeploymentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + if (message.deletePolicy != null && Object.hasOwnProperty.call(message, "deletePolicy")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.deletePolicy); + return writer; + }; + + /** + * Encodes the specified DeleteDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeleteDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @static + * @param {google.cloud.config.v1.IDeleteDeploymentRequest} message DeleteDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.DeleteDeploymentRequest} DeleteDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDeploymentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.DeleteDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + case 3: { + message.force = reader.bool(); + break; + } + case 4: { + message.deletePolicy = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.DeleteDeploymentRequest} DeleteDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDeploymentRequest message. + * @function verify + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDeploymentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.deletePolicy != null && message.hasOwnProperty("deletePolicy")) + switch (message.deletePolicy) { + default: + return "deletePolicy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DeleteDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.DeleteDeploymentRequest} DeleteDeploymentRequest + */ + DeleteDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.DeleteDeploymentRequest) + return object; + var message = new $root.google.cloud.config.v1.DeleteDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.force != null) + message.force = Boolean(object.force); + switch (object.deletePolicy) { + default: + if (typeof object.deletePolicy === "number") { + message.deletePolicy = object.deletePolicy; + break; + } + break; + case "DELETE_POLICY_UNSPECIFIED": + case 0: + message.deletePolicy = 0; + break; + case "DELETE": + case 1: + message.deletePolicy = 1; + break; + case "ABANDON": + case 2: + message.deletePolicy = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DeleteDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @static + * @param {google.cloud.config.v1.DeleteDeploymentRequest} message DeleteDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.force = false; + object.deletePolicy = options.enums === String ? "DELETE_POLICY_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + if (message.deletePolicy != null && message.hasOwnProperty("deletePolicy")) + object.deletePolicy = options.enums === String ? $root.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy[message.deletePolicy] === undefined ? message.deletePolicy : $root.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy[message.deletePolicy] : message.deletePolicy; + return object; + }; + + /** + * Converts this DeleteDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.DeleteDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.DeleteDeploymentRequest"; + }; + + /** + * DeletePolicy enum. + * @name google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy + * @enum {number} + * @property {number} DELETE_POLICY_UNSPECIFIED=0 DELETE_POLICY_UNSPECIFIED value + * @property {number} DELETE=1 DELETE value + * @property {number} ABANDON=2 ABANDON value + */ + DeleteDeploymentRequest.DeletePolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DELETE_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DELETE"] = 1; + values[valuesById[2] = "ABANDON"] = 2; + return values; + })(); + + return DeleteDeploymentRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.config.v1 + * @interface IOperationMetadata + * @property {google.cloud.config.v1.IDeploymentOperationMetadata|null} [deploymentMetadata] OperationMetadata deploymentMetadata + * @property {google.cloud.config.v1.IPreviewOperationMetadata|null} [previewMetadata] OperationMetadata previewMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.config.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.config.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata deploymentMetadata. + * @member {google.cloud.config.v1.IDeploymentOperationMetadata|null|undefined} deploymentMetadata + * @memberof google.cloud.config.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.deploymentMetadata = null; + + /** + * OperationMetadata previewMetadata. + * @member {google.cloud.config.v1.IPreviewOperationMetadata|null|undefined} previewMetadata + * @memberof google.cloud.config.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.previewMetadata = null; + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.config.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.config.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.config.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.config.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.config.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.config.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.config.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OperationMetadata resourceMetadata. + * @member {"deploymentMetadata"|"previewMetadata"|undefined} resourceMetadata + * @memberof google.cloud.config.v1.OperationMetadata + * @instance + */ + Object.defineProperty(OperationMetadata.prototype, "resourceMetadata", { + get: $util.oneOfGetter($oneOfFields = ["deploymentMetadata", "previewMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.OperationMetadata + * @static + * @param {google.cloud.config.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.config.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.config.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.OperationMetadata + * @static + * @param {google.cloud.config.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.deploymentMetadata != null && Object.hasOwnProperty.call(message, "deploymentMetadata")) + $root.google.cloud.config.v1.DeploymentOperationMetadata.encode(message.deploymentMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.previewMetadata != null && Object.hasOwnProperty.call(message, "previewMetadata")) + $root.google.cloud.config.v1.PreviewOperationMetadata.encode(message.previewMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.OperationMetadata + * @static + * @param {google.cloud.config.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 8: { + message.deploymentMetadata = $root.google.cloud.config.v1.DeploymentOperationMetadata.decode(reader, reader.uint32()); + break; + } + case 9: { + message.previewMetadata = $root.google.cloud.config.v1.PreviewOperationMetadata.decode(reader, reader.uint32()); + break; + } + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.config.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.deploymentMetadata != null && message.hasOwnProperty("deploymentMetadata")) { + properties.resourceMetadata = 1; + { + var error = $root.google.cloud.config.v1.DeploymentOperationMetadata.verify(message.deploymentMetadata); + if (error) + return "deploymentMetadata." + error; + } + } + if (message.previewMetadata != null && message.hasOwnProperty("previewMetadata")) { + if (properties.resourceMetadata === 1) + return "resourceMetadata: multiple values"; + properties.resourceMetadata = 1; + { + var error = $root.google.cloud.config.v1.PreviewOperationMetadata.verify(message.previewMetadata); + if (error) + return "previewMetadata." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.config.v1.OperationMetadata(); + if (object.deploymentMetadata != null) { + if (typeof object.deploymentMetadata !== "object") + throw TypeError(".google.cloud.config.v1.OperationMetadata.deploymentMetadata: object expected"); + message.deploymentMetadata = $root.google.cloud.config.v1.DeploymentOperationMetadata.fromObject(object.deploymentMetadata); + } + if (object.previewMetadata != null) { + if (typeof object.previewMetadata !== "object") + throw TypeError(".google.cloud.config.v1.OperationMetadata.previewMetadata: object expected"); + message.previewMetadata = $root.google.cloud.config.v1.PreviewOperationMetadata.fromObject(object.previewMetadata); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.config.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.config.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.OperationMetadata + * @static + * @param {google.cloud.config.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + if (message.deploymentMetadata != null && message.hasOwnProperty("deploymentMetadata")) { + object.deploymentMetadata = $root.google.cloud.config.v1.DeploymentOperationMetadata.toObject(message.deploymentMetadata, options); + if (options.oneofs) + object.resourceMetadata = "deploymentMetadata"; + } + if (message.previewMetadata != null && message.hasOwnProperty("previewMetadata")) { + object.previewMetadata = $root.google.cloud.config.v1.PreviewOperationMetadata.toObject(message.previewMetadata, options); + if (options.oneofs) + object.resourceMetadata = "previewMetadata"; + } + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.config.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1.Revision = (function() { + + /** + * Properties of a Revision. + * @memberof google.cloud.config.v1 + * @interface IRevision + * @property {google.cloud.config.v1.ITerraformBlueprint|null} [terraformBlueprint] Revision terraformBlueprint + * @property {string|null} [name] Revision name + * @property {google.protobuf.ITimestamp|null} [createTime] Revision createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Revision updateTime + * @property {google.cloud.config.v1.Revision.Action|null} [action] Revision action + * @property {google.cloud.config.v1.Revision.State|null} [state] Revision state + * @property {google.cloud.config.v1.IApplyResults|null} [applyResults] Revision applyResults + * @property {string|null} [stateDetail] Revision stateDetail + * @property {google.cloud.config.v1.Revision.ErrorCode|null} [errorCode] Revision errorCode + * @property {string|null} [build] Revision build + * @property {string|null} [logs] Revision logs + * @property {Array.|null} [tfErrors] Revision tfErrors + * @property {string|null} [errorLogs] Revision errorLogs + * @property {string|null} [serviceAccount] Revision serviceAccount + * @property {boolean|null} [importExistingResources] Revision importExistingResources + * @property {string|null} [workerPool] Revision workerPool + * @property {string|null} [tfVersionConstraint] Revision tfVersionConstraint + * @property {string|null} [tfVersion] Revision tfVersion + * @property {string|null} [quotaValidationResults] Revision quotaValidationResults + * @property {google.cloud.config.v1.QuotaValidation|null} [quotaValidation] Revision quotaValidation + * @property {google.cloud.config.v1.IProviderConfig|null} [providerConfig] Revision providerConfig + */ + + /** + * Constructs a new Revision. + * @memberof google.cloud.config.v1 + * @classdesc Represents a Revision. + * @implements IRevision + * @constructor + * @param {google.cloud.config.v1.IRevision=} [properties] Properties to set + */ + function Revision(properties) { + this.tfErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Revision terraformBlueprint. + * @member {google.cloud.config.v1.ITerraformBlueprint|null|undefined} terraformBlueprint + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.terraformBlueprint = null; + + /** + * Revision name. + * @member {string} name + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.name = ""; + + /** + * Revision createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.createTime = null; + + /** + * Revision updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.updateTime = null; + + /** + * Revision action. + * @member {google.cloud.config.v1.Revision.Action} action + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.action = 0; + + /** + * Revision state. + * @member {google.cloud.config.v1.Revision.State} state + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.state = 0; + + /** + * Revision applyResults. + * @member {google.cloud.config.v1.IApplyResults|null|undefined} applyResults + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.applyResults = null; + + /** + * Revision stateDetail. + * @member {string} stateDetail + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.stateDetail = ""; + + /** + * Revision errorCode. + * @member {google.cloud.config.v1.Revision.ErrorCode} errorCode + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.errorCode = 0; + + /** + * Revision build. + * @member {string} build + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.build = ""; + + /** + * Revision logs. + * @member {string} logs + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.logs = ""; + + /** + * Revision tfErrors. + * @member {Array.} tfErrors + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.tfErrors = $util.emptyArray; + + /** + * Revision errorLogs. + * @member {string} errorLogs + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.errorLogs = ""; + + /** + * Revision serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.serviceAccount = ""; + + /** + * Revision importExistingResources. + * @member {boolean} importExistingResources + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.importExistingResources = false; + + /** + * Revision workerPool. + * @member {string} workerPool + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.workerPool = ""; + + /** + * Revision tfVersionConstraint. + * @member {string} tfVersionConstraint + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.tfVersionConstraint = ""; + + /** + * Revision tfVersion. + * @member {string} tfVersion + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.tfVersion = ""; + + /** + * Revision quotaValidationResults. + * @member {string} quotaValidationResults + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.quotaValidationResults = ""; + + /** + * Revision quotaValidation. + * @member {google.cloud.config.v1.QuotaValidation} quotaValidation + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.quotaValidation = 0; + + /** + * Revision providerConfig. + * @member {google.cloud.config.v1.IProviderConfig|null|undefined} providerConfig + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Revision.prototype.providerConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Revision blueprint. + * @member {"terraformBlueprint"|undefined} blueprint + * @memberof google.cloud.config.v1.Revision + * @instance + */ + Object.defineProperty(Revision.prototype, "blueprint", { + get: $util.oneOfGetter($oneOfFields = ["terraformBlueprint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Revision instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.Revision + * @static + * @param {google.cloud.config.v1.IRevision=} [properties] Properties to set + * @returns {google.cloud.config.v1.Revision} Revision instance + */ + Revision.create = function create(properties) { + return new Revision(properties); + }; + + /** + * Encodes the specified Revision message. Does not implicitly {@link google.cloud.config.v1.Revision.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.Revision + * @static + * @param {google.cloud.config.v1.IRevision} message Revision message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Revision.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.action); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.terraformBlueprint != null && Object.hasOwnProperty.call(message, "terraformBlueprint")) + $root.google.cloud.config.v1.TerraformBlueprint.encode(message.terraformBlueprint, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.applyResults != null && Object.hasOwnProperty.call(message, "applyResults")) + $root.google.cloud.config.v1.ApplyResults.encode(message.applyResults, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.stateDetail != null && Object.hasOwnProperty.call(message, "stateDetail")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.stateDetail); + if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.errorCode); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.build); + if (message.logs != null && Object.hasOwnProperty.call(message, "logs")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.logs); + if (message.tfErrors != null && message.tfErrors.length) + for (var i = 0; i < message.tfErrors.length; ++i) + $root.google.cloud.config.v1.TerraformError.encode(message.tfErrors[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.errorLogs != null && Object.hasOwnProperty.call(message, "errorLogs")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.errorLogs); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.serviceAccount); + if (message.importExistingResources != null && Object.hasOwnProperty.call(message, "importExistingResources")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.importExistingResources); + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.workerPool); + if (message.tfVersionConstraint != null && Object.hasOwnProperty.call(message, "tfVersionConstraint")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.tfVersionConstraint); + if (message.tfVersion != null && Object.hasOwnProperty.call(message, "tfVersion")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.tfVersion); + if (message.quotaValidation != null && Object.hasOwnProperty.call(message, "quotaValidation")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.quotaValidation); + if (message.providerConfig != null && Object.hasOwnProperty.call(message, "providerConfig")) + $root.google.cloud.config.v1.ProviderConfig.encode(message.providerConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.quotaValidationResults != null && Object.hasOwnProperty.call(message, "quotaValidationResults")) + writer.uint32(/* id 29, wireType 2 =*/234).string(message.quotaValidationResults); + return writer; + }; + + /** + * Encodes the specified Revision message, length delimited. Does not implicitly {@link google.cloud.config.v1.Revision.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.Revision + * @static + * @param {google.cloud.config.v1.IRevision} message Revision message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Revision.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Revision message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.Revision + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.Revision} Revision + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Revision.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.Revision(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 6: { + message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.action = reader.int32(); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 7: { + message.applyResults = $root.google.cloud.config.v1.ApplyResults.decode(reader, reader.uint32()); + break; + } + case 8: { + message.stateDetail = reader.string(); + break; + } + case 9: { + message.errorCode = reader.int32(); + break; + } + case 10: { + message.build = reader.string(); + break; + } + case 11: { + message.logs = reader.string(); + break; + } + case 12: { + if (!(message.tfErrors && message.tfErrors.length)) + message.tfErrors = []; + message.tfErrors.push($root.google.cloud.config.v1.TerraformError.decode(reader, reader.uint32())); + break; + } + case 13: { + message.errorLogs = reader.string(); + break; + } + case 14: { + message.serviceAccount = reader.string(); + break; + } + case 15: { + message.importExistingResources = reader.bool(); + break; + } + case 17: { + message.workerPool = reader.string(); + break; + } + case 18: { + message.tfVersionConstraint = reader.string(); + break; + } + case 19: { + message.tfVersion = reader.string(); + break; + } + case 29: { + message.quotaValidationResults = reader.string(); + break; + } + case 20: { + message.quotaValidation = reader.int32(); + break; + } + case 21: { + message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Revision message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.Revision + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.Revision} Revision + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Revision.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Revision message. + * @function verify + * @memberof google.cloud.config.v1.Revision + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Revision.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { + properties.blueprint = 1; + { + var error = $root.google.cloud.config.v1.TerraformBlueprint.verify(message.terraformBlueprint); + if (error) + return "terraformBlueprint." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.applyResults != null && message.hasOwnProperty("applyResults")) { + var error = $root.google.cloud.config.v1.ApplyResults.verify(message.applyResults); + if (error) + return "applyResults." + error; + } + if (message.stateDetail != null && message.hasOwnProperty("stateDetail")) + if (!$util.isString(message.stateDetail)) + return "stateDetail: string expected"; + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + switch (message.errorCode) { + default: + return "errorCode: enum value expected"; + case 0: + case 1: + case 4: + case 5: + case 7: + case 8: + break; + } + if (message.build != null && message.hasOwnProperty("build")) + if (!$util.isString(message.build)) + return "build: string expected"; + if (message.logs != null && message.hasOwnProperty("logs")) + if (!$util.isString(message.logs)) + return "logs: string expected"; + if (message.tfErrors != null && message.hasOwnProperty("tfErrors")) { + if (!Array.isArray(message.tfErrors)) + return "tfErrors: array expected"; + for (var i = 0; i < message.tfErrors.length; ++i) { + var error = $root.google.cloud.config.v1.TerraformError.verify(message.tfErrors[i]); + if (error) + return "tfErrors." + error; + } + } + if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) + if (!$util.isString(message.errorLogs)) + return "errorLogs: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.importExistingResources != null && message.hasOwnProperty("importExistingResources")) + if (typeof message.importExistingResources !== "boolean") + return "importExistingResources: boolean expected"; + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) + if (!$util.isString(message.tfVersionConstraint)) + return "tfVersionConstraint: string expected"; + if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) + if (!$util.isString(message.tfVersion)) + return "tfVersion: string expected"; + if (message.quotaValidationResults != null && message.hasOwnProperty("quotaValidationResults")) + if (!$util.isString(message.quotaValidationResults)) + return "quotaValidationResults: string expected"; + if (message.quotaValidation != null && message.hasOwnProperty("quotaValidation")) + switch (message.quotaValidation) { + default: + return "quotaValidation: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) { + var error = $root.google.cloud.config.v1.ProviderConfig.verify(message.providerConfig); + if (error) + return "providerConfig." + error; + } + return null; + }; + + /** + * Creates a Revision message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.Revision + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.Revision} Revision + */ + Revision.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.Revision) + return object; + var message = new $root.google.cloud.config.v1.Revision(); + if (object.terraformBlueprint != null) { + if (typeof object.terraformBlueprint !== "object") + throw TypeError(".google.cloud.config.v1.Revision.terraformBlueprint: object expected"); + message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.fromObject(object.terraformBlueprint); + } + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.config.v1.Revision.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.config.v1.Revision.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "CREATE": + case 1: + message.action = 1; + break; + case "UPDATE": + case 2: + message.action = 2; + break; + case "DELETE": + case 3: + message.action = 3; + break; + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "APPLYING": + case 1: + message.state = 1; + break; + case "APPLIED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + } + if (object.applyResults != null) { + if (typeof object.applyResults !== "object") + throw TypeError(".google.cloud.config.v1.Revision.applyResults: object expected"); + message.applyResults = $root.google.cloud.config.v1.ApplyResults.fromObject(object.applyResults); + } + if (object.stateDetail != null) + message.stateDetail = String(object.stateDetail); + switch (object.errorCode) { + default: + if (typeof object.errorCode === "number") { + message.errorCode = object.errorCode; + break; + } + break; + case "ERROR_CODE_UNSPECIFIED": + case 0: + message.errorCode = 0; + break; + case "CLOUD_BUILD_PERMISSION_DENIED": + case 1: + message.errorCode = 1; + break; + case "APPLY_BUILD_API_FAILED": + case 4: + message.errorCode = 4; + break; + case "APPLY_BUILD_RUN_FAILED": + case 5: + message.errorCode = 5; + break; + case "QUOTA_VALIDATION_FAILED": + case 7: + message.errorCode = 7; + break; + case "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": + case 8: + message.errorCode = 8; + break; + } + if (object.build != null) + message.build = String(object.build); + if (object.logs != null) + message.logs = String(object.logs); + if (object.tfErrors) { + if (!Array.isArray(object.tfErrors)) + throw TypeError(".google.cloud.config.v1.Revision.tfErrors: array expected"); + message.tfErrors = []; + for (var i = 0; i < object.tfErrors.length; ++i) { + if (typeof object.tfErrors[i] !== "object") + throw TypeError(".google.cloud.config.v1.Revision.tfErrors: object expected"); + message.tfErrors[i] = $root.google.cloud.config.v1.TerraformError.fromObject(object.tfErrors[i]); + } + } + if (object.errorLogs != null) + message.errorLogs = String(object.errorLogs); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.importExistingResources != null) + message.importExistingResources = Boolean(object.importExistingResources); + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + if (object.tfVersionConstraint != null) + message.tfVersionConstraint = String(object.tfVersionConstraint); + if (object.tfVersion != null) + message.tfVersion = String(object.tfVersion); + if (object.quotaValidationResults != null) + message.quotaValidationResults = String(object.quotaValidationResults); + switch (object.quotaValidation) { + default: + if (typeof object.quotaValidation === "number") { + message.quotaValidation = object.quotaValidation; + break; + } + break; + case "QUOTA_VALIDATION_UNSPECIFIED": + case 0: + message.quotaValidation = 0; + break; + case "ENABLED": + case 1: + message.quotaValidation = 1; + break; + case "ENFORCED": + case 2: + message.quotaValidation = 2; + break; + } + if (object.providerConfig != null) { + if (typeof object.providerConfig !== "object") + throw TypeError(".google.cloud.config.v1.Revision.providerConfig: object expected"); + message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.fromObject(object.providerConfig); + } + return message; + }; + + /** + * Creates a plain object from a Revision message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.Revision + * @static + * @param {google.cloud.config.v1.Revision} message Revision + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Revision.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tfErrors = []; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.applyResults = null; + object.stateDetail = ""; + object.errorCode = options.enums === String ? "ERROR_CODE_UNSPECIFIED" : 0; + object.build = ""; + object.logs = ""; + object.errorLogs = ""; + object.serviceAccount = ""; + object.importExistingResources = false; + object.workerPool = ""; + object.tfVersionConstraint = ""; + object.tfVersion = ""; + object.quotaValidation = options.enums === String ? "QUOTA_VALIDATION_UNSPECIFIED" : 0; + object.providerConfig = null; + object.quotaValidationResults = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.cloud.config.v1.Revision.Action[message.action] === undefined ? message.action : $root.google.cloud.config.v1.Revision.Action[message.action] : message.action; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.config.v1.Revision.State[message.state] === undefined ? message.state : $root.google.cloud.config.v1.Revision.State[message.state] : message.state; + if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { + object.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.toObject(message.terraformBlueprint, options); + if (options.oneofs) + object.blueprint = "terraformBlueprint"; + } + if (message.applyResults != null && message.hasOwnProperty("applyResults")) + object.applyResults = $root.google.cloud.config.v1.ApplyResults.toObject(message.applyResults, options); + if (message.stateDetail != null && message.hasOwnProperty("stateDetail")) + object.stateDetail = message.stateDetail; + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + object.errorCode = options.enums === String ? $root.google.cloud.config.v1.Revision.ErrorCode[message.errorCode] === undefined ? message.errorCode : $root.google.cloud.config.v1.Revision.ErrorCode[message.errorCode] : message.errorCode; + if (message.build != null && message.hasOwnProperty("build")) + object.build = message.build; + if (message.logs != null && message.hasOwnProperty("logs")) + object.logs = message.logs; + if (message.tfErrors && message.tfErrors.length) { + object.tfErrors = []; + for (var j = 0; j < message.tfErrors.length; ++j) + object.tfErrors[j] = $root.google.cloud.config.v1.TerraformError.toObject(message.tfErrors[j], options); + } + if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) + object.errorLogs = message.errorLogs; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.importExistingResources != null && message.hasOwnProperty("importExistingResources")) + object.importExistingResources = message.importExistingResources; + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = message.workerPool; + if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) + object.tfVersionConstraint = message.tfVersionConstraint; + if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) + object.tfVersion = message.tfVersion; + if (message.quotaValidation != null && message.hasOwnProperty("quotaValidation")) + object.quotaValidation = options.enums === String ? $root.google.cloud.config.v1.QuotaValidation[message.quotaValidation] === undefined ? message.quotaValidation : $root.google.cloud.config.v1.QuotaValidation[message.quotaValidation] : message.quotaValidation; + if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) + object.providerConfig = $root.google.cloud.config.v1.ProviderConfig.toObject(message.providerConfig, options); + if (message.quotaValidationResults != null && message.hasOwnProperty("quotaValidationResults")) + object.quotaValidationResults = message.quotaValidationResults; + return object; + }; + + /** + * Converts this Revision to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.Revision + * @instance + * @returns {Object.} JSON object + */ + Revision.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Revision + * @function getTypeUrl + * @memberof google.cloud.config.v1.Revision + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Revision.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.Revision"; + }; + + /** + * Action enum. + * @name google.cloud.config.v1.Revision.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} CREATE=1 CREATE value + * @property {number} UPDATE=2 UPDATE value + * @property {number} DELETE=3 DELETE value + */ + Revision.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE"] = 1; + values[valuesById[2] = "UPDATE"] = 2; + values[valuesById[3] = "DELETE"] = 3; + return values; + })(); + + /** + * State enum. + * @name google.cloud.config.v1.Revision.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} APPLYING=1 APPLYING value + * @property {number} APPLIED=2 APPLIED value + * @property {number} FAILED=3 FAILED value + */ + Revision.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "APPLYING"] = 1; + values[valuesById[2] = "APPLIED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + /** + * ErrorCode enum. + * @name google.cloud.config.v1.Revision.ErrorCode + * @enum {number} + * @property {number} ERROR_CODE_UNSPECIFIED=0 ERROR_CODE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_PERMISSION_DENIED=1 CLOUD_BUILD_PERMISSION_DENIED value + * @property {number} APPLY_BUILD_API_FAILED=4 APPLY_BUILD_API_FAILED value + * @property {number} APPLY_BUILD_RUN_FAILED=5 APPLY_BUILD_RUN_FAILED value + * @property {number} QUOTA_VALIDATION_FAILED=7 QUOTA_VALIDATION_FAILED value + * @property {number} EXTERNAL_VALUE_SOURCE_IMPORT_FAILED=8 EXTERNAL_VALUE_SOURCE_IMPORT_FAILED value + */ + Revision.ErrorCode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERROR_CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_PERMISSION_DENIED"] = 1; + values[valuesById[4] = "APPLY_BUILD_API_FAILED"] = 4; + values[valuesById[5] = "APPLY_BUILD_RUN_FAILED"] = 5; + values[valuesById[7] = "QUOTA_VALIDATION_FAILED"] = 7; + values[valuesById[8] = "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED"] = 8; + return values; + })(); + + return Revision; + })(); + + v1.TerraformError = (function() { + + /** + * Properties of a TerraformError. + * @memberof google.cloud.config.v1 + * @interface ITerraformError + * @property {string|null} [resourceAddress] TerraformError resourceAddress + * @property {number|null} [httpResponseCode] TerraformError httpResponseCode + * @property {string|null} [errorDescription] TerraformError errorDescription + * @property {google.rpc.IStatus|null} [error] TerraformError error + */ + + /** + * Constructs a new TerraformError. + * @memberof google.cloud.config.v1 + * @classdesc Represents a TerraformError. + * @implements ITerraformError + * @constructor + * @param {google.cloud.config.v1.ITerraformError=} [properties] Properties to set + */ + function TerraformError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerraformError resourceAddress. + * @member {string} resourceAddress + * @memberof google.cloud.config.v1.TerraformError + * @instance + */ + TerraformError.prototype.resourceAddress = ""; + + /** + * TerraformError httpResponseCode. + * @member {number} httpResponseCode + * @memberof google.cloud.config.v1.TerraformError + * @instance + */ + TerraformError.prototype.httpResponseCode = 0; + + /** + * TerraformError errorDescription. + * @member {string} errorDescription + * @memberof google.cloud.config.v1.TerraformError + * @instance + */ + TerraformError.prototype.errorDescription = ""; + + /** + * TerraformError error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.config.v1.TerraformError + * @instance + */ + TerraformError.prototype.error = null; + + /** + * Creates a new TerraformError instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.TerraformError + * @static + * @param {google.cloud.config.v1.ITerraformError=} [properties] Properties to set + * @returns {google.cloud.config.v1.TerraformError} TerraformError instance + */ + TerraformError.create = function create(properties) { + return new TerraformError(properties); + }; + + /** + * Encodes the specified TerraformError message. Does not implicitly {@link google.cloud.config.v1.TerraformError.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.TerraformError + * @static + * @param {google.cloud.config.v1.ITerraformError} message TerraformError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerraformError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceAddress != null && Object.hasOwnProperty.call(message, "resourceAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceAddress); + if (message.httpResponseCode != null && Object.hasOwnProperty.call(message, "httpResponseCode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.httpResponseCode); + if (message.errorDescription != null && Object.hasOwnProperty.call(message, "errorDescription")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorDescription); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TerraformError message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.TerraformError + * @static + * @param {google.cloud.config.v1.ITerraformError} message TerraformError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerraformError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerraformError message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.TerraformError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.TerraformError} TerraformError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerraformError.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.TerraformError(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resourceAddress = reader.string(); + break; + } + case 2: { + message.httpResponseCode = reader.int32(); + break; + } + case 3: { + message.errorDescription = reader.string(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TerraformError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.TerraformError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.TerraformError} TerraformError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerraformError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerraformError message. + * @function verify + * @memberof google.cloud.config.v1.TerraformError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerraformError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceAddress != null && message.hasOwnProperty("resourceAddress")) + if (!$util.isString(message.resourceAddress)) + return "resourceAddress: string expected"; + if (message.httpResponseCode != null && message.hasOwnProperty("httpResponseCode")) + if (!$util.isInteger(message.httpResponseCode)) + return "httpResponseCode: integer expected"; + if (message.errorDescription != null && message.hasOwnProperty("errorDescription")) + if (!$util.isString(message.errorDescription)) + return "errorDescription: string expected"; + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + return null; + }; + + /** + * Creates a TerraformError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.TerraformError + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.TerraformError} TerraformError + */ + TerraformError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.TerraformError) + return object; + var message = new $root.google.cloud.config.v1.TerraformError(); + if (object.resourceAddress != null) + message.resourceAddress = String(object.resourceAddress); + if (object.httpResponseCode != null) + message.httpResponseCode = object.httpResponseCode | 0; + if (object.errorDescription != null) + message.errorDescription = String(object.errorDescription); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.config.v1.TerraformError.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + return message; + }; + + /** + * Creates a plain object from a TerraformError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.TerraformError + * @static + * @param {google.cloud.config.v1.TerraformError} message TerraformError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerraformError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resourceAddress = ""; + object.httpResponseCode = 0; + object.errorDescription = ""; + object.error = null; + } + if (message.resourceAddress != null && message.hasOwnProperty("resourceAddress")) + object.resourceAddress = message.resourceAddress; + if (message.httpResponseCode != null && message.hasOwnProperty("httpResponseCode")) + object.httpResponseCode = message.httpResponseCode; + if (message.errorDescription != null && message.hasOwnProperty("errorDescription")) + object.errorDescription = message.errorDescription; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + return object; + }; + + /** + * Converts this TerraformError to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.TerraformError + * @instance + * @returns {Object.} JSON object + */ + TerraformError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerraformError + * @function getTypeUrl + * @memberof google.cloud.config.v1.TerraformError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerraformError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.TerraformError"; + }; + + return TerraformError; + })(); + + v1.GitSource = (function() { + + /** + * Properties of a GitSource. + * @memberof google.cloud.config.v1 + * @interface IGitSource + * @property {string|null} [repo] GitSource repo + * @property {string|null} [directory] GitSource directory + * @property {string|null} [ref] GitSource ref + */ + + /** + * Constructs a new GitSource. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GitSource. + * @implements IGitSource + * @constructor + * @param {google.cloud.config.v1.IGitSource=} [properties] Properties to set + */ + function GitSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GitSource repo. + * @member {string|null|undefined} repo + * @memberof google.cloud.config.v1.GitSource + * @instance + */ + GitSource.prototype.repo = null; + + /** + * GitSource directory. + * @member {string|null|undefined} directory + * @memberof google.cloud.config.v1.GitSource + * @instance + */ + GitSource.prototype.directory = null; + + /** + * GitSource ref. + * @member {string|null|undefined} ref + * @memberof google.cloud.config.v1.GitSource + * @instance + */ + GitSource.prototype.ref = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GitSource.prototype, "_repo", { + get: $util.oneOfGetter($oneOfFields = ["repo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GitSource.prototype, "_directory", { + get: $util.oneOfGetter($oneOfFields = ["directory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GitSource.prototype, "_ref", { + get: $util.oneOfGetter($oneOfFields = ["ref"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GitSource instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GitSource + * @static + * @param {google.cloud.config.v1.IGitSource=} [properties] Properties to set + * @returns {google.cloud.config.v1.GitSource} GitSource instance + */ + GitSource.create = function create(properties) { + return new GitSource(properties); + }; + + /** + * Encodes the specified GitSource message. Does not implicitly {@link google.cloud.config.v1.GitSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GitSource + * @static + * @param {google.cloud.config.v1.IGitSource} message GitSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repo != null && Object.hasOwnProperty.call(message, "repo")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.repo); + if (message.directory != null && Object.hasOwnProperty.call(message, "directory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.directory); + if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ref); + return writer; + }; + + /** + * Encodes the specified GitSource message, length delimited. Does not implicitly {@link google.cloud.config.v1.GitSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GitSource + * @static + * @param {google.cloud.config.v1.IGitSource} message GitSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GitSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GitSource} GitSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GitSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.repo = reader.string(); + break; + } + case 2: { + message.directory = reader.string(); + break; + } + case 3: { + message.ref = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GitSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GitSource} GitSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitSource message. + * @function verify + * @memberof google.cloud.config.v1.GitSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.repo != null && message.hasOwnProperty("repo")) { + properties._repo = 1; + if (!$util.isString(message.repo)) + return "repo: string expected"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + properties._directory = 1; + if (!$util.isString(message.directory)) + return "directory: string expected"; + } + if (message.ref != null && message.hasOwnProperty("ref")) { + properties._ref = 1; + if (!$util.isString(message.ref)) + return "ref: string expected"; + } + return null; + }; + + /** + * Creates a GitSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GitSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GitSource} GitSource + */ + GitSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GitSource) + return object; + var message = new $root.google.cloud.config.v1.GitSource(); + if (object.repo != null) + message.repo = String(object.repo); + if (object.directory != null) + message.directory = String(object.directory); + if (object.ref != null) + message.ref = String(object.ref); + return message; + }; + + /** + * Creates a plain object from a GitSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GitSource + * @static + * @param {google.cloud.config.v1.GitSource} message GitSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.repo != null && message.hasOwnProperty("repo")) { + object.repo = message.repo; + if (options.oneofs) + object._repo = "repo"; + } + if (message.directory != null && message.hasOwnProperty("directory")) { + object.directory = message.directory; + if (options.oneofs) + object._directory = "directory"; + } + if (message.ref != null && message.hasOwnProperty("ref")) { + object.ref = message.ref; + if (options.oneofs) + object._ref = "ref"; + } + return object; + }; + + /** + * Converts this GitSource to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GitSource + * @instance + * @returns {Object.} JSON object + */ + GitSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GitSource + * @function getTypeUrl + * @memberof google.cloud.config.v1.GitSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GitSource"; + }; + + return GitSource; + })(); + + v1.DeploymentOperationMetadata = (function() { + + /** + * Properties of a DeploymentOperationMetadata. + * @memberof google.cloud.config.v1 + * @interface IDeploymentOperationMetadata + * @property {google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep|null} [step] DeploymentOperationMetadata step + * @property {google.cloud.config.v1.IApplyResults|null} [applyResults] DeploymentOperationMetadata applyResults + * @property {string|null} [build] DeploymentOperationMetadata build + * @property {string|null} [logs] DeploymentOperationMetadata logs + */ + + /** + * Constructs a new DeploymentOperationMetadata. + * @memberof google.cloud.config.v1 + * @classdesc Represents a DeploymentOperationMetadata. + * @implements IDeploymentOperationMetadata + * @constructor + * @param {google.cloud.config.v1.IDeploymentOperationMetadata=} [properties] Properties to set + */ + function DeploymentOperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeploymentOperationMetadata step. + * @member {google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep} step + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @instance + */ + DeploymentOperationMetadata.prototype.step = 0; + + /** + * DeploymentOperationMetadata applyResults. + * @member {google.cloud.config.v1.IApplyResults|null|undefined} applyResults + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @instance + */ + DeploymentOperationMetadata.prototype.applyResults = null; + + /** + * DeploymentOperationMetadata build. + * @member {string} build + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @instance + */ + DeploymentOperationMetadata.prototype.build = ""; + + /** + * DeploymentOperationMetadata logs. + * @member {string} logs + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @instance + */ + DeploymentOperationMetadata.prototype.logs = ""; + + /** + * Creates a new DeploymentOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @static + * @param {google.cloud.config.v1.IDeploymentOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.config.v1.DeploymentOperationMetadata} DeploymentOperationMetadata instance + */ + DeploymentOperationMetadata.create = function create(properties) { + return new DeploymentOperationMetadata(properties); + }; + + /** + * Encodes the specified DeploymentOperationMetadata message. Does not implicitly {@link google.cloud.config.v1.DeploymentOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @static + * @param {google.cloud.config.v1.IDeploymentOperationMetadata} message DeploymentOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeploymentOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.step != null && Object.hasOwnProperty.call(message, "step")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.step); + if (message.applyResults != null && Object.hasOwnProperty.call(message, "applyResults")) + $root.google.cloud.config.v1.ApplyResults.encode(message.applyResults, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.build); + if (message.logs != null && Object.hasOwnProperty.call(message, "logs")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logs); + return writer; + }; + + /** + * Encodes the specified DeploymentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeploymentOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @static + * @param {google.cloud.config.v1.IDeploymentOperationMetadata} message DeploymentOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeploymentOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeploymentOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.DeploymentOperationMetadata} DeploymentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeploymentOperationMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.DeploymentOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.step = reader.int32(); + break; + } + case 2: { + message.applyResults = $root.google.cloud.config.v1.ApplyResults.decode(reader, reader.uint32()); + break; + } + case 3: { + message.build = reader.string(); + break; + } + case 4: { + message.logs = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeploymentOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.DeploymentOperationMetadata} DeploymentOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeploymentOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeploymentOperationMetadata message. + * @function verify + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeploymentOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.step != null && message.hasOwnProperty("step")) + switch (message.step) { + default: + return "step: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.applyResults != null && message.hasOwnProperty("applyResults")) { + var error = $root.google.cloud.config.v1.ApplyResults.verify(message.applyResults); + if (error) + return "applyResults." + error; + } + if (message.build != null && message.hasOwnProperty("build")) + if (!$util.isString(message.build)) + return "build: string expected"; + if (message.logs != null && message.hasOwnProperty("logs")) + if (!$util.isString(message.logs)) + return "logs: string expected"; + return null; + }; + + /** + * Creates a DeploymentOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.DeploymentOperationMetadata} DeploymentOperationMetadata + */ + DeploymentOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.DeploymentOperationMetadata) + return object; + var message = new $root.google.cloud.config.v1.DeploymentOperationMetadata(); + switch (object.step) { + default: + if (typeof object.step === "number") { + message.step = object.step; + break; + } + break; + case "DEPLOYMENT_STEP_UNSPECIFIED": + case 0: + message.step = 0; + break; + case "PREPARING_STORAGE_BUCKET": + case 1: + message.step = 1; + break; + case "DOWNLOADING_BLUEPRINT": + case 2: + message.step = 2; + break; + case "RUNNING_TF_INIT": + case 3: + message.step = 3; + break; + case "RUNNING_TF_PLAN": + case 4: + message.step = 4; + break; + case "RUNNING_TF_APPLY": + case 5: + message.step = 5; + break; + case "RUNNING_TF_DESTROY": + case 6: + message.step = 6; + break; + case "RUNNING_TF_VALIDATE": + case 7: + message.step = 7; + break; + case "UNLOCKING_DEPLOYMENT": + case 8: + message.step = 8; + break; + case "SUCCEEDED": + case 9: + message.step = 9; + break; + case "FAILED": + case 10: + message.step = 10; + break; + case "VALIDATING_REPOSITORY": + case 11: + message.step = 11; + break; + case "RUNNING_QUOTA_VALIDATION": + case 12: + message.step = 12; + break; + } + if (object.applyResults != null) { + if (typeof object.applyResults !== "object") + throw TypeError(".google.cloud.config.v1.DeploymentOperationMetadata.applyResults: object expected"); + message.applyResults = $root.google.cloud.config.v1.ApplyResults.fromObject(object.applyResults); + } + if (object.build != null) + message.build = String(object.build); + if (object.logs != null) + message.logs = String(object.logs); + return message; + }; + + /** + * Creates a plain object from a DeploymentOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @static + * @param {google.cloud.config.v1.DeploymentOperationMetadata} message DeploymentOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeploymentOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.step = options.enums === String ? "DEPLOYMENT_STEP_UNSPECIFIED" : 0; + object.applyResults = null; + object.build = ""; + object.logs = ""; + } + if (message.step != null && message.hasOwnProperty("step")) + object.step = options.enums === String ? $root.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep[message.step] === undefined ? message.step : $root.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep[message.step] : message.step; + if (message.applyResults != null && message.hasOwnProperty("applyResults")) + object.applyResults = $root.google.cloud.config.v1.ApplyResults.toObject(message.applyResults, options); + if (message.build != null && message.hasOwnProperty("build")) + object.build = message.build; + if (message.logs != null && message.hasOwnProperty("logs")) + object.logs = message.logs; + return object; + }; + + /** + * Converts this DeploymentOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + DeploymentOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeploymentOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.config.v1.DeploymentOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeploymentOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.DeploymentOperationMetadata"; + }; + + /** + * DeploymentStep enum. + * @name google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep + * @enum {number} + * @property {number} DEPLOYMENT_STEP_UNSPECIFIED=0 DEPLOYMENT_STEP_UNSPECIFIED value + * @property {number} PREPARING_STORAGE_BUCKET=1 PREPARING_STORAGE_BUCKET value + * @property {number} DOWNLOADING_BLUEPRINT=2 DOWNLOADING_BLUEPRINT value + * @property {number} RUNNING_TF_INIT=3 RUNNING_TF_INIT value + * @property {number} RUNNING_TF_PLAN=4 RUNNING_TF_PLAN value + * @property {number} RUNNING_TF_APPLY=5 RUNNING_TF_APPLY value + * @property {number} RUNNING_TF_DESTROY=6 RUNNING_TF_DESTROY value + * @property {number} RUNNING_TF_VALIDATE=7 RUNNING_TF_VALIDATE value + * @property {number} UNLOCKING_DEPLOYMENT=8 UNLOCKING_DEPLOYMENT value + * @property {number} SUCCEEDED=9 SUCCEEDED value + * @property {number} FAILED=10 FAILED value + * @property {number} VALIDATING_REPOSITORY=11 VALIDATING_REPOSITORY value + * @property {number} RUNNING_QUOTA_VALIDATION=12 RUNNING_QUOTA_VALIDATION value + */ + DeploymentOperationMetadata.DeploymentStep = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEPLOYMENT_STEP_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREPARING_STORAGE_BUCKET"] = 1; + values[valuesById[2] = "DOWNLOADING_BLUEPRINT"] = 2; + values[valuesById[3] = "RUNNING_TF_INIT"] = 3; + values[valuesById[4] = "RUNNING_TF_PLAN"] = 4; + values[valuesById[5] = "RUNNING_TF_APPLY"] = 5; + values[valuesById[6] = "RUNNING_TF_DESTROY"] = 6; + values[valuesById[7] = "RUNNING_TF_VALIDATE"] = 7; + values[valuesById[8] = "UNLOCKING_DEPLOYMENT"] = 8; + values[valuesById[9] = "SUCCEEDED"] = 9; + values[valuesById[10] = "FAILED"] = 10; + values[valuesById[11] = "VALIDATING_REPOSITORY"] = 11; + values[valuesById[12] = "RUNNING_QUOTA_VALIDATION"] = 12; + return values; + })(); + + return DeploymentOperationMetadata; + })(); + + v1.Resource = (function() { + + /** + * Properties of a Resource. + * @memberof google.cloud.config.v1 + * @interface IResource + * @property {string|null} [name] Resource name + * @property {google.cloud.config.v1.IResourceTerraformInfo|null} [terraformInfo] Resource terraformInfo + * @property {Object.|null} [caiAssets] Resource caiAssets + * @property {google.cloud.config.v1.Resource.Intent|null} [intent] Resource intent + * @property {google.cloud.config.v1.Resource.State|null} [state] Resource state + */ + + /** + * Constructs a new Resource. + * @memberof google.cloud.config.v1 + * @classdesc Represents a Resource. + * @implements IResource + * @constructor + * @param {google.cloud.config.v1.IResource=} [properties] Properties to set + */ + function Resource(properties) { + this.caiAssets = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Resource name. + * @member {string} name + * @memberof google.cloud.config.v1.Resource + * @instance + */ + Resource.prototype.name = ""; + + /** + * Resource terraformInfo. + * @member {google.cloud.config.v1.IResourceTerraformInfo|null|undefined} terraformInfo + * @memberof google.cloud.config.v1.Resource + * @instance + */ + Resource.prototype.terraformInfo = null; + + /** + * Resource caiAssets. + * @member {Object.} caiAssets + * @memberof google.cloud.config.v1.Resource + * @instance + */ + Resource.prototype.caiAssets = $util.emptyObject; + + /** + * Resource intent. + * @member {google.cloud.config.v1.Resource.Intent} intent + * @memberof google.cloud.config.v1.Resource + * @instance + */ + Resource.prototype.intent = 0; + + /** + * Resource state. + * @member {google.cloud.config.v1.Resource.State} state + * @memberof google.cloud.config.v1.Resource + * @instance + */ + Resource.prototype.state = 0; + + /** + * Creates a new Resource instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.Resource + * @static + * @param {google.cloud.config.v1.IResource=} [properties] Properties to set + * @returns {google.cloud.config.v1.Resource} Resource instance + */ + Resource.create = function create(properties) { + return new Resource(properties); + }; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.config.v1.Resource.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.Resource + * @static + * @param {google.cloud.config.v1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encode = function encode(message, writer) { + 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.terraformInfo != null && Object.hasOwnProperty.call(message, "terraformInfo")) + $root.google.cloud.config.v1.ResourceTerraformInfo.encode(message.terraformInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.caiAssets != null && Object.hasOwnProperty.call(message, "caiAssets")) + for (var keys = Object.keys(message.caiAssets), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.config.v1.ResourceCAIInfo.encode(message.caiAssets[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.intent); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + return writer; + }; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.config.v1.Resource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.Resource + * @static + * @param {google.cloud.config.v1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Resource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.Resource(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.terraformInfo = $root.google.cloud.config.v1.ResourceTerraformInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + if (message.caiAssets === $util.emptyObject) + message.caiAssets = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.config.v1.ResourceCAIInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.caiAssets[key] = value; + break; + } + case 4: { + message.intent = reader.int32(); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Resource message. + * @function verify + * @memberof google.cloud.config.v1.Resource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Resource.verify = function verify(message) { + if (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.terraformInfo != null && message.hasOwnProperty("terraformInfo")) { + var error = $root.google.cloud.config.v1.ResourceTerraformInfo.verify(message.terraformInfo); + if (error) + return "terraformInfo." + error; + } + if (message.caiAssets != null && message.hasOwnProperty("caiAssets")) { + if (!$util.isObject(message.caiAssets)) + return "caiAssets: object expected"; + var key = Object.keys(message.caiAssets); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.config.v1.ResourceCAIInfo.verify(message.caiAssets[key[i]]); + if (error) + return "caiAssets." + error; + } + } + if (message.intent != null && message.hasOwnProperty("intent")) + switch (message.intent) { + default: + return "intent: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.Resource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.Resource} Resource + */ + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.Resource) + return object; + var message = new $root.google.cloud.config.v1.Resource(); + if (object.name != null) + message.name = String(object.name); + if (object.terraformInfo != null) { + if (typeof object.terraformInfo !== "object") + throw TypeError(".google.cloud.config.v1.Resource.terraformInfo: object expected"); + message.terraformInfo = $root.google.cloud.config.v1.ResourceTerraformInfo.fromObject(object.terraformInfo); + } + if (object.caiAssets) { + if (typeof object.caiAssets !== "object") + throw TypeError(".google.cloud.config.v1.Resource.caiAssets: object expected"); + message.caiAssets = {}; + for (var keys = Object.keys(object.caiAssets), i = 0; i < keys.length; ++i) { + if (typeof object.caiAssets[keys[i]] !== "object") + throw TypeError(".google.cloud.config.v1.Resource.caiAssets: object expected"); + message.caiAssets[keys[i]] = $root.google.cloud.config.v1.ResourceCAIInfo.fromObject(object.caiAssets[keys[i]]); + } + } + switch (object.intent) { + default: + if (typeof object.intent === "number") { + message.intent = object.intent; + break; + } + break; + case "INTENT_UNSPECIFIED": + case 0: + message.intent = 0; + break; + case "CREATE": + case 1: + message.intent = 1; + break; + case "UPDATE": + case 2: + message.intent = 2; + break; + case "DELETE": + case 3: + message.intent = 3; + break; + case "RECREATE": + case 4: + message.intent = 4; + break; + case "UNCHANGED": + case 5: + message.intent = 5; + break; + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PLANNED": + case 1: + message.state = 1; + break; + case "IN_PROGRESS": + case 2: + message.state = 2; + break; + case "RECONCILED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.Resource + * @static + * @param {google.cloud.config.v1.Resource} message Resource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Resource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.caiAssets = {}; + if (options.defaults) { + object.name = ""; + object.terraformInfo = null; + object.intent = options.enums === String ? "INTENT_UNSPECIFIED" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.terraformInfo != null && message.hasOwnProperty("terraformInfo")) + object.terraformInfo = $root.google.cloud.config.v1.ResourceTerraformInfo.toObject(message.terraformInfo, options); + var keys2; + if (message.caiAssets && (keys2 = Object.keys(message.caiAssets)).length) { + object.caiAssets = {}; + for (var j = 0; j < keys2.length; ++j) + object.caiAssets[keys2[j]] = $root.google.cloud.config.v1.ResourceCAIInfo.toObject(message.caiAssets[keys2[j]], options); + } + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = options.enums === String ? $root.google.cloud.config.v1.Resource.Intent[message.intent] === undefined ? message.intent : $root.google.cloud.config.v1.Resource.Intent[message.intent] : message.intent; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.config.v1.Resource.State[message.state] === undefined ? message.state : $root.google.cloud.config.v1.Resource.State[message.state] : message.state; + return object; + }; + + /** + * Converts this Resource to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.Resource + * @instance + * @returns {Object.} JSON object + */ + Resource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Resource + * @function getTypeUrl + * @memberof google.cloud.config.v1.Resource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.Resource"; + }; + + /** + * Intent enum. + * @name google.cloud.config.v1.Resource.Intent + * @enum {number} + * @property {number} INTENT_UNSPECIFIED=0 INTENT_UNSPECIFIED value + * @property {number} CREATE=1 CREATE value + * @property {number} UPDATE=2 UPDATE value + * @property {number} DELETE=3 DELETE value + * @property {number} RECREATE=4 RECREATE value + * @property {number} UNCHANGED=5 UNCHANGED value + */ + Resource.Intent = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE"] = 1; + values[valuesById[2] = "UPDATE"] = 2; + values[valuesById[3] = "DELETE"] = 3; + values[valuesById[4] = "RECREATE"] = 4; + values[valuesById[5] = "UNCHANGED"] = 5; + return values; + })(); + + /** + * State enum. + * @name google.cloud.config.v1.Resource.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PLANNED=1 PLANNED value + * @property {number} IN_PROGRESS=2 IN_PROGRESS value + * @property {number} RECONCILED=3 RECONCILED value + * @property {number} FAILED=4 FAILED value + */ + Resource.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PLANNED"] = 1; + values[valuesById[2] = "IN_PROGRESS"] = 2; + values[valuesById[3] = "RECONCILED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + return Resource; + })(); + + v1.ResourceTerraformInfo = (function() { + + /** + * Properties of a ResourceTerraformInfo. + * @memberof google.cloud.config.v1 + * @interface IResourceTerraformInfo + * @property {string|null} [address] ResourceTerraformInfo address + * @property {string|null} [type] ResourceTerraformInfo type + * @property {string|null} [id] ResourceTerraformInfo id + */ + + /** + * Constructs a new ResourceTerraformInfo. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ResourceTerraformInfo. + * @implements IResourceTerraformInfo + * @constructor + * @param {google.cloud.config.v1.IResourceTerraformInfo=} [properties] Properties to set + */ + function ResourceTerraformInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceTerraformInfo address. + * @member {string} address + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @instance + */ + ResourceTerraformInfo.prototype.address = ""; + + /** + * ResourceTerraformInfo type. + * @member {string} type + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @instance + */ + ResourceTerraformInfo.prototype.type = ""; + + /** + * ResourceTerraformInfo id. + * @member {string} id + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @instance + */ + ResourceTerraformInfo.prototype.id = ""; + + /** + * Creates a new ResourceTerraformInfo instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceTerraformInfo=} [properties] Properties to set + * @returns {google.cloud.config.v1.ResourceTerraformInfo} ResourceTerraformInfo instance + */ + ResourceTerraformInfo.create = function create(properties) { + return new ResourceTerraformInfo(properties); + }; + + /** + * Encodes the specified ResourceTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceTerraformInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceTerraformInfo} message ResourceTerraformInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceTerraformInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.id); + return writer; + }; + + /** + * Encodes the specified ResourceTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceTerraformInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceTerraformInfo} message ResourceTerraformInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceTerraformInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceTerraformInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ResourceTerraformInfo} ResourceTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceTerraformInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceTerraformInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.address = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + message.id = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceTerraformInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ResourceTerraformInfo} ResourceTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceTerraformInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceTerraformInfo message. + * @function verify + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceTerraformInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a ResourceTerraformInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ResourceTerraformInfo} ResourceTerraformInfo + */ + ResourceTerraformInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ResourceTerraformInfo) + return object; + var message = new $root.google.cloud.config.v1.ResourceTerraformInfo(); + if (object.address != null) + message.address = String(object.address); + if (object.type != null) + message.type = String(object.type); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a ResourceTerraformInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @static + * @param {google.cloud.config.v1.ResourceTerraformInfo} message ResourceTerraformInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceTerraformInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.address = ""; + object.type = ""; + object.id = ""; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this ResourceTerraformInfo to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @instance + * @returns {Object.} JSON object + */ + ResourceTerraformInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceTerraformInfo + * @function getTypeUrl + * @memberof google.cloud.config.v1.ResourceTerraformInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceTerraformInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ResourceTerraformInfo"; + }; + + return ResourceTerraformInfo; + })(); + + v1.ResourceCAIInfo = (function() { + + /** + * Properties of a ResourceCAIInfo. + * @memberof google.cloud.config.v1 + * @interface IResourceCAIInfo + * @property {string|null} [fullResourceName] ResourceCAIInfo fullResourceName + */ + + /** + * Constructs a new ResourceCAIInfo. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ResourceCAIInfo. + * @implements IResourceCAIInfo + * @constructor + * @param {google.cloud.config.v1.IResourceCAIInfo=} [properties] Properties to set + */ + function ResourceCAIInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceCAIInfo fullResourceName. + * @member {string} fullResourceName + * @memberof google.cloud.config.v1.ResourceCAIInfo + * @instance + */ + ResourceCAIInfo.prototype.fullResourceName = ""; + + /** + * Creates a new ResourceCAIInfo instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ResourceCAIInfo + * @static + * @param {google.cloud.config.v1.IResourceCAIInfo=} [properties] Properties to set + * @returns {google.cloud.config.v1.ResourceCAIInfo} ResourceCAIInfo instance + */ + ResourceCAIInfo.create = function create(properties) { + return new ResourceCAIInfo(properties); + }; + + /** + * Encodes the specified ResourceCAIInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceCAIInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ResourceCAIInfo + * @static + * @param {google.cloud.config.v1.IResourceCAIInfo} message ResourceCAIInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceCAIInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fullResourceName != null && Object.hasOwnProperty.call(message, "fullResourceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fullResourceName); + return writer; + }; + + /** + * Encodes the specified ResourceCAIInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceCAIInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ResourceCAIInfo + * @static + * @param {google.cloud.config.v1.IResourceCAIInfo} message ResourceCAIInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceCAIInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceCAIInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ResourceCAIInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ResourceCAIInfo} ResourceCAIInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceCAIInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceCAIInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fullResourceName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceCAIInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ResourceCAIInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ResourceCAIInfo} ResourceCAIInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceCAIInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceCAIInfo message. + * @function verify + * @memberof google.cloud.config.v1.ResourceCAIInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceCAIInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName")) + if (!$util.isString(message.fullResourceName)) + return "fullResourceName: string expected"; + return null; + }; + + /** + * Creates a ResourceCAIInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ResourceCAIInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ResourceCAIInfo} ResourceCAIInfo + */ + ResourceCAIInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ResourceCAIInfo) + return object; + var message = new $root.google.cloud.config.v1.ResourceCAIInfo(); + if (object.fullResourceName != null) + message.fullResourceName = String(object.fullResourceName); + return message; + }; + + /** + * Creates a plain object from a ResourceCAIInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ResourceCAIInfo + * @static + * @param {google.cloud.config.v1.ResourceCAIInfo} message ResourceCAIInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceCAIInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fullResourceName = ""; + if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName")) + object.fullResourceName = message.fullResourceName; + return object; + }; + + /** + * Converts this ResourceCAIInfo to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ResourceCAIInfo + * @instance + * @returns {Object.} JSON object + */ + ResourceCAIInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceCAIInfo + * @function getTypeUrl + * @memberof google.cloud.config.v1.ResourceCAIInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceCAIInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ResourceCAIInfo"; + }; + + return ResourceCAIInfo; + })(); + + v1.GetResourceRequest = (function() { + + /** + * Properties of a GetResourceRequest. + * @memberof google.cloud.config.v1 + * @interface IGetResourceRequest + * @property {string|null} [name] GetResourceRequest name + */ + + /** + * Constructs a new GetResourceRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GetResourceRequest. + * @implements IGetResourceRequest + * @constructor + * @param {google.cloud.config.v1.IGetResourceRequest=} [properties] Properties to set + */ + function GetResourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetResourceRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.GetResourceRequest + * @instance + */ + GetResourceRequest.prototype.name = ""; + + /** + * Creates a new GetResourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GetResourceRequest + * @static + * @param {google.cloud.config.v1.IGetResourceRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.GetResourceRequest} GetResourceRequest instance + */ + GetResourceRequest.create = function create(properties) { + return new GetResourceRequest(properties); + }; + + /** + * Encodes the specified GetResourceRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GetResourceRequest + * @static + * @param {google.cloud.config.v1.IGetResourceRequest} message GetResourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetResourceRequest.encode = function encode(message, writer) { + 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 GetResourceRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GetResourceRequest + * @static + * @param {google.cloud.config.v1.IGetResourceRequest} message GetResourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetResourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetResourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GetResourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GetResourceRequest} GetResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetResourceRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetResourceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetResourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GetResourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GetResourceRequest} GetResourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetResourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetResourceRequest message. + * @function verify + * @memberof google.cloud.config.v1.GetResourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetResourceRequest.verify = function verify(message) { + if (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 GetResourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GetResourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GetResourceRequest} GetResourceRequest + */ + GetResourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GetResourceRequest) + return object; + var message = new $root.google.cloud.config.v1.GetResourceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetResourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GetResourceRequest + * @static + * @param {google.cloud.config.v1.GetResourceRequest} message GetResourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetResourceRequest.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 GetResourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GetResourceRequest + * @instance + * @returns {Object.} JSON object + */ + GetResourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetResourceRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.GetResourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetResourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GetResourceRequest"; + }; + + return GetResourceRequest; + })(); + + v1.ListResourcesRequest = (function() { + + /** + * Properties of a ListResourcesRequest. + * @memberof google.cloud.config.v1 + * @interface IListResourcesRequest + * @property {string|null} [parent] ListResourcesRequest parent + * @property {number|null} [pageSize] ListResourcesRequest pageSize + * @property {string|null} [pageToken] ListResourcesRequest pageToken + * @property {string|null} [filter] ListResourcesRequest filter + * @property {string|null} [orderBy] ListResourcesRequest orderBy + */ + + /** + * Constructs a new ListResourcesRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListResourcesRequest. + * @implements IListResourcesRequest + * @constructor + * @param {google.cloud.config.v1.IListResourcesRequest=} [properties] Properties to set + */ + function ListResourcesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListResourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ListResourcesRequest + * @instance + */ + ListResourcesRequest.prototype.parent = ""; + + /** + * ListResourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.config.v1.ListResourcesRequest + * @instance + */ + ListResourcesRequest.prototype.pageSize = 0; + + /** + * ListResourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.config.v1.ListResourcesRequest + * @instance + */ + ListResourcesRequest.prototype.pageToken = ""; + + /** + * ListResourcesRequest filter. + * @member {string} filter + * @memberof google.cloud.config.v1.ListResourcesRequest + * @instance + */ + ListResourcesRequest.prototype.filter = ""; + + /** + * ListResourcesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.config.v1.ListResourcesRequest + * @instance + */ + ListResourcesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListResourcesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListResourcesRequest + * @static + * @param {google.cloud.config.v1.IListResourcesRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListResourcesRequest} ListResourcesRequest instance + */ + ListResourcesRequest.create = function create(properties) { + return new ListResourcesRequest(properties); + }; + + /** + * Encodes the specified ListResourcesRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourcesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListResourcesRequest + * @static + * @param {google.cloud.config.v1.IListResourcesRequest} message ListResourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourcesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourcesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListResourcesRequest + * @static + * @param {google.cloud.config.v1.IListResourcesRequest} message ListResourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListResourcesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListResourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListResourcesRequest} ListResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourcesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourcesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListResourcesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListResourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListResourcesRequest} ListResourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourcesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListResourcesRequest message. + * @function verify + * @memberof google.cloud.config.v1.ListResourcesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListResourcesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListResourcesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListResourcesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListResourcesRequest} ListResourcesRequest + */ + ListResourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListResourcesRequest) + return object; + var message = new $root.google.cloud.config.v1.ListResourcesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListResourcesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListResourcesRequest + * @static + * @param {google.cloud.config.v1.ListResourcesRequest} message ListResourcesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListResourcesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListResourcesRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListResourcesRequest + * @instance + * @returns {Object.} JSON object + */ + ListResourcesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListResourcesRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListResourcesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListResourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListResourcesRequest"; + }; + + return ListResourcesRequest; + })(); + + v1.ListResourcesResponse = (function() { + + /** + * Properties of a ListResourcesResponse. + * @memberof google.cloud.config.v1 + * @interface IListResourcesResponse + * @property {Array.|null} [resources] ListResourcesResponse resources + * @property {string|null} [nextPageToken] ListResourcesResponse nextPageToken + * @property {Array.|null} [unreachable] ListResourcesResponse unreachable + */ + + /** + * Constructs a new ListResourcesResponse. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListResourcesResponse. + * @implements IListResourcesResponse + * @constructor + * @param {google.cloud.config.v1.IListResourcesResponse=} [properties] Properties to set + */ + function ListResourcesResponse(properties) { + this.resources = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListResourcesResponse resources. + * @member {Array.} resources + * @memberof google.cloud.config.v1.ListResourcesResponse + * @instance + */ + ListResourcesResponse.prototype.resources = $util.emptyArray; + + /** + * ListResourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.config.v1.ListResourcesResponse + * @instance + */ + ListResourcesResponse.prototype.nextPageToken = ""; + + /** + * ListResourcesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.config.v1.ListResourcesResponse + * @instance + */ + ListResourcesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListResourcesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListResourcesResponse + * @static + * @param {google.cloud.config.v1.IListResourcesResponse=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListResourcesResponse} ListResourcesResponse instance + */ + ListResourcesResponse.create = function create(properties) { + return new ListResourcesResponse(properties); + }; + + /** + * Encodes the specified ListResourcesResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourcesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListResourcesResponse + * @static + * @param {google.cloud.config.v1.IListResourcesResponse} message ListResourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourcesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + $root.google.cloud.config.v1.Resource.encode(message.resources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourcesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListResourcesResponse + * @static + * @param {google.cloud.config.v1.IListResourcesResponse} message ListResourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListResourcesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListResourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListResourcesResponse} ListResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourcesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourcesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.config.v1.Resource.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListResourcesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListResourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListResourcesResponse} ListResourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourcesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListResourcesResponse message. + * @function verify + * @memberof google.cloud.config.v1.ListResourcesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListResourcesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resources != null && message.hasOwnProperty("resources")) { + if (!Array.isArray(message.resources)) + return "resources: array expected"; + for (var i = 0; i < message.resources.length; ++i) { + var error = $root.google.cloud.config.v1.Resource.verify(message.resources[i]); + if (error) + return "resources." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListResourcesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListResourcesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListResourcesResponse} ListResourcesResponse + */ + ListResourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListResourcesResponse) + return object; + var message = new $root.google.cloud.config.v1.ListResourcesResponse(); + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.config.v1.ListResourcesResponse.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) { + if (typeof object.resources[i] !== "object") + throw TypeError(".google.cloud.config.v1.ListResourcesResponse.resources: object expected"); + message.resources[i] = $root.google.cloud.config.v1.Resource.fromObject(object.resources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.config.v1.ListResourcesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListResourcesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListResourcesResponse + * @static + * @param {google.cloud.config.v1.ListResourcesResponse} message ListResourcesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListResourcesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = $root.google.cloud.config.v1.Resource.toObject(message.resources[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListResourcesResponse to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListResourcesResponse + * @instance + * @returns {Object.} JSON object + */ + ListResourcesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListResourcesResponse + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListResourcesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListResourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListResourcesResponse"; + }; + + return ListResourcesResponse; + })(); + + v1.Statefile = (function() { + + /** + * Properties of a Statefile. + * @memberof google.cloud.config.v1 + * @interface IStatefile + * @property {string|null} [signedUri] Statefile signedUri + */ + + /** + * Constructs a new Statefile. + * @memberof google.cloud.config.v1 + * @classdesc Represents a Statefile. + * @implements IStatefile + * @constructor + * @param {google.cloud.config.v1.IStatefile=} [properties] Properties to set + */ + function Statefile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Statefile signedUri. + * @member {string} signedUri + * @memberof google.cloud.config.v1.Statefile + * @instance + */ + Statefile.prototype.signedUri = ""; + + /** + * Creates a new Statefile instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.Statefile + * @static + * @param {google.cloud.config.v1.IStatefile=} [properties] Properties to set + * @returns {google.cloud.config.v1.Statefile} Statefile instance + */ + Statefile.create = function create(properties) { + return new Statefile(properties); + }; + + /** + * Encodes the specified Statefile message. Does not implicitly {@link google.cloud.config.v1.Statefile.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.Statefile + * @static + * @param {google.cloud.config.v1.IStatefile} message Statefile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Statefile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signedUri != null && Object.hasOwnProperty.call(message, "signedUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.signedUri); + return writer; + }; + + /** + * Encodes the specified Statefile message, length delimited. Does not implicitly {@link google.cloud.config.v1.Statefile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.Statefile + * @static + * @param {google.cloud.config.v1.IStatefile} message Statefile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Statefile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Statefile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.Statefile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.Statefile} Statefile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Statefile.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.Statefile(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.signedUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Statefile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.Statefile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.Statefile} Statefile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Statefile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Statefile message. + * @function verify + * @memberof google.cloud.config.v1.Statefile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Statefile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signedUri != null && message.hasOwnProperty("signedUri")) + if (!$util.isString(message.signedUri)) + return "signedUri: string expected"; + return null; + }; + + /** + * Creates a Statefile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.Statefile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.Statefile} Statefile + */ + Statefile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.Statefile) + return object; + var message = new $root.google.cloud.config.v1.Statefile(); + if (object.signedUri != null) + message.signedUri = String(object.signedUri); + return message; + }; + + /** + * Creates a plain object from a Statefile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.Statefile + * @static + * @param {google.cloud.config.v1.Statefile} message Statefile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Statefile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.signedUri = ""; + if (message.signedUri != null && message.hasOwnProperty("signedUri")) + object.signedUri = message.signedUri; + return object; + }; + + /** + * Converts this Statefile to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.Statefile + * @instance + * @returns {Object.} JSON object + */ + Statefile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Statefile + * @function getTypeUrl + * @memberof google.cloud.config.v1.Statefile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Statefile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.Statefile"; + }; + + return Statefile; + })(); + + v1.ExportDeploymentStatefileRequest = (function() { + + /** + * Properties of an ExportDeploymentStatefileRequest. + * @memberof google.cloud.config.v1 + * @interface IExportDeploymentStatefileRequest + * @property {string|null} [parent] ExportDeploymentStatefileRequest parent + * @property {boolean|null} [draft] ExportDeploymentStatefileRequest draft + */ + + /** + * Constructs a new ExportDeploymentStatefileRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents an ExportDeploymentStatefileRequest. + * @implements IExportDeploymentStatefileRequest + * @constructor + * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest=} [properties] Properties to set + */ + function ExportDeploymentStatefileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportDeploymentStatefileRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @instance + */ + ExportDeploymentStatefileRequest.prototype.parent = ""; + + /** + * ExportDeploymentStatefileRequest draft. + * @member {boolean} draft + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @instance + */ + ExportDeploymentStatefileRequest.prototype.draft = false; + + /** + * Creates a new ExportDeploymentStatefileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @static + * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ExportDeploymentStatefileRequest} ExportDeploymentStatefileRequest instance + */ + ExportDeploymentStatefileRequest.create = function create(properties) { + return new ExportDeploymentStatefileRequest(properties); + }; + + /** + * Encodes the specified ExportDeploymentStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ExportDeploymentStatefileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @static + * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest} message ExportDeploymentStatefileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportDeploymentStatefileRequest.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.draft != null && Object.hasOwnProperty.call(message, "draft")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.draft); + return writer; + }; + + /** + * Encodes the specified ExportDeploymentStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportDeploymentStatefileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @static + * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest} message ExportDeploymentStatefileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportDeploymentStatefileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportDeploymentStatefileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ExportDeploymentStatefileRequest} ExportDeploymentStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportDeploymentStatefileRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ExportDeploymentStatefileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.draft = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportDeploymentStatefileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ExportDeploymentStatefileRequest} ExportDeploymentStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportDeploymentStatefileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportDeploymentStatefileRequest message. + * @function verify + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportDeploymentStatefileRequest.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.draft != null && message.hasOwnProperty("draft")) + if (typeof message.draft !== "boolean") + return "draft: boolean expected"; + return null; + }; + + /** + * Creates an ExportDeploymentStatefileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ExportDeploymentStatefileRequest} ExportDeploymentStatefileRequest + */ + ExportDeploymentStatefileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ExportDeploymentStatefileRequest) + return object; + var message = new $root.google.cloud.config.v1.ExportDeploymentStatefileRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.draft != null) + message.draft = Boolean(object.draft); + return message; + }; + + /** + * Creates a plain object from an ExportDeploymentStatefileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @static + * @param {google.cloud.config.v1.ExportDeploymentStatefileRequest} message ExportDeploymentStatefileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportDeploymentStatefileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.draft = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.draft != null && message.hasOwnProperty("draft")) + object.draft = message.draft; + return object; + }; + + /** + * Converts this ExportDeploymentStatefileRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @instance + * @returns {Object.} JSON object + */ + ExportDeploymentStatefileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportDeploymentStatefileRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportDeploymentStatefileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ExportDeploymentStatefileRequest"; + }; + + return ExportDeploymentStatefileRequest; + })(); + + v1.ExportRevisionStatefileRequest = (function() { + + /** + * Properties of an ExportRevisionStatefileRequest. + * @memberof google.cloud.config.v1 + * @interface IExportRevisionStatefileRequest + * @property {string|null} [parent] ExportRevisionStatefileRequest parent + */ + + /** + * Constructs a new ExportRevisionStatefileRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents an ExportRevisionStatefileRequest. + * @implements IExportRevisionStatefileRequest + * @constructor + * @param {google.cloud.config.v1.IExportRevisionStatefileRequest=} [properties] Properties to set + */ + function ExportRevisionStatefileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportRevisionStatefileRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest + * @instance + */ + ExportRevisionStatefileRequest.prototype.parent = ""; + + /** + * Creates a new ExportRevisionStatefileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest + * @static + * @param {google.cloud.config.v1.IExportRevisionStatefileRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ExportRevisionStatefileRequest} ExportRevisionStatefileRequest instance + */ + ExportRevisionStatefileRequest.create = function create(properties) { + return new ExportRevisionStatefileRequest(properties); + }; + + /** + * Encodes the specified ExportRevisionStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ExportRevisionStatefileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest + * @static + * @param {google.cloud.config.v1.IExportRevisionStatefileRequest} message ExportRevisionStatefileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportRevisionStatefileRequest.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); + return writer; + }; + + /** + * Encodes the specified ExportRevisionStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportRevisionStatefileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest + * @static + * @param {google.cloud.config.v1.IExportRevisionStatefileRequest} message ExportRevisionStatefileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportRevisionStatefileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportRevisionStatefileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ExportRevisionStatefileRequest} ExportRevisionStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportRevisionStatefileRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ExportRevisionStatefileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportRevisionStatefileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ExportRevisionStatefileRequest} ExportRevisionStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportRevisionStatefileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportRevisionStatefileRequest message. + * @function verify + * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportRevisionStatefileRequest.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"; + return null; + }; + + /** + * Creates an ExportRevisionStatefileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ExportRevisionStatefileRequest} ExportRevisionStatefileRequest + */ + ExportRevisionStatefileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ExportRevisionStatefileRequest) + return object; + var message = new $root.google.cloud.config.v1.ExportRevisionStatefileRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from an ExportRevisionStatefileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest + * @static + * @param {google.cloud.config.v1.ExportRevisionStatefileRequest} message ExportRevisionStatefileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportRevisionStatefileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ExportRevisionStatefileRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest + * @instance + * @returns {Object.} JSON object + */ + ExportRevisionStatefileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportRevisionStatefileRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportRevisionStatefileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ExportRevisionStatefileRequest"; + }; + + return ExportRevisionStatefileRequest; + })(); + + v1.ImportStatefileRequest = (function() { + + /** + * Properties of an ImportStatefileRequest. + * @memberof google.cloud.config.v1 + * @interface IImportStatefileRequest + * @property {string|null} [parent] ImportStatefileRequest parent + * @property {number|Long|null} [lockId] ImportStatefileRequest lockId + * @property {boolean|null} [skipDraft] ImportStatefileRequest skipDraft + */ + + /** + * Constructs a new ImportStatefileRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents an ImportStatefileRequest. + * @implements IImportStatefileRequest + * @constructor + * @param {google.cloud.config.v1.IImportStatefileRequest=} [properties] Properties to set + */ + function ImportStatefileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportStatefileRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @instance + */ + ImportStatefileRequest.prototype.parent = ""; + + /** + * ImportStatefileRequest lockId. + * @member {number|Long} lockId + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @instance + */ + ImportStatefileRequest.prototype.lockId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImportStatefileRequest skipDraft. + * @member {boolean} skipDraft + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @instance + */ + ImportStatefileRequest.prototype.skipDraft = false; + + /** + * Creates a new ImportStatefileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @static + * @param {google.cloud.config.v1.IImportStatefileRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ImportStatefileRequest} ImportStatefileRequest instance + */ + ImportStatefileRequest.create = function create(properties) { + return new ImportStatefileRequest(properties); + }; + + /** + * Encodes the specified ImportStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ImportStatefileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @static + * @param {google.cloud.config.v1.IImportStatefileRequest} message ImportStatefileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportStatefileRequest.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.lockId != null && Object.hasOwnProperty.call(message, "lockId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lockId); + if (message.skipDraft != null && Object.hasOwnProperty.call(message, "skipDraft")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.skipDraft); + return writer; + }; + + /** + * Encodes the specified ImportStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ImportStatefileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @static + * @param {google.cloud.config.v1.IImportStatefileRequest} message ImportStatefileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportStatefileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportStatefileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ImportStatefileRequest} ImportStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportStatefileRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ImportStatefileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.lockId = reader.int64(); + break; + } + case 3: { + message.skipDraft = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportStatefileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ImportStatefileRequest} ImportStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportStatefileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportStatefileRequest message. + * @function verify + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportStatefileRequest.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.lockId != null && message.hasOwnProperty("lockId")) + if (!$util.isInteger(message.lockId) && !(message.lockId && $util.isInteger(message.lockId.low) && $util.isInteger(message.lockId.high))) + return "lockId: integer|Long expected"; + if (message.skipDraft != null && message.hasOwnProperty("skipDraft")) + if (typeof message.skipDraft !== "boolean") + return "skipDraft: boolean expected"; + return null; + }; + + /** + * Creates an ImportStatefileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ImportStatefileRequest} ImportStatefileRequest + */ + ImportStatefileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ImportStatefileRequest) + return object; + var message = new $root.google.cloud.config.v1.ImportStatefileRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.lockId != null) + if ($util.Long) + (message.lockId = $util.Long.fromValue(object.lockId)).unsigned = false; + else if (typeof object.lockId === "string") + message.lockId = parseInt(object.lockId, 10); + else if (typeof object.lockId === "number") + message.lockId = object.lockId; + else if (typeof object.lockId === "object") + message.lockId = new $util.LongBits(object.lockId.low >>> 0, object.lockId.high >>> 0).toNumber(); + if (object.skipDraft != null) + message.skipDraft = Boolean(object.skipDraft); + return message; + }; + + /** + * Creates a plain object from an ImportStatefileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @static + * @param {google.cloud.config.v1.ImportStatefileRequest} message ImportStatefileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportStatefileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lockId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lockId = options.longs === String ? "0" : 0; + object.skipDraft = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.lockId != null && message.hasOwnProperty("lockId")) + if (typeof message.lockId === "number") + object.lockId = options.longs === String ? String(message.lockId) : message.lockId; + else + object.lockId = options.longs === String ? $util.Long.prototype.toString.call(message.lockId) : options.longs === Number ? new $util.LongBits(message.lockId.low >>> 0, message.lockId.high >>> 0).toNumber() : message.lockId; + if (message.skipDraft != null && message.hasOwnProperty("skipDraft")) + object.skipDraft = message.skipDraft; + return object; + }; + + /** + * Converts this ImportStatefileRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @instance + * @returns {Object.} JSON object + */ + ImportStatefileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportStatefileRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ImportStatefileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportStatefileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ImportStatefileRequest"; + }; + + return ImportStatefileRequest; + })(); + + v1.DeleteStatefileRequest = (function() { + + /** + * Properties of a DeleteStatefileRequest. + * @memberof google.cloud.config.v1 + * @interface IDeleteStatefileRequest + * @property {string|null} [name] DeleteStatefileRequest name + * @property {number|Long|null} [lockId] DeleteStatefileRequest lockId + */ + + /** + * Constructs a new DeleteStatefileRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a DeleteStatefileRequest. + * @implements IDeleteStatefileRequest + * @constructor + * @param {google.cloud.config.v1.IDeleteStatefileRequest=} [properties] Properties to set + */ + function DeleteStatefileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteStatefileRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @instance + */ + DeleteStatefileRequest.prototype.name = ""; + + /** + * DeleteStatefileRequest lockId. + * @member {number|Long} lockId + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @instance + */ + DeleteStatefileRequest.prototype.lockId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DeleteStatefileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @static + * @param {google.cloud.config.v1.IDeleteStatefileRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.DeleteStatefileRequest} DeleteStatefileRequest instance + */ + DeleteStatefileRequest.create = function create(properties) { + return new DeleteStatefileRequest(properties); + }; + + /** + * Encodes the specified DeleteStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.DeleteStatefileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @static + * @param {google.cloud.config.v1.IDeleteStatefileRequest} message DeleteStatefileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteStatefileRequest.encode = function encode(message, writer) { + 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.lockId != null && Object.hasOwnProperty.call(message, "lockId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lockId); + return writer; + }; + + /** + * Encodes the specified DeleteStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeleteStatefileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @static + * @param {google.cloud.config.v1.IDeleteStatefileRequest} message DeleteStatefileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteStatefileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteStatefileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.DeleteStatefileRequest} DeleteStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteStatefileRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.DeleteStatefileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.lockId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteStatefileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.DeleteStatefileRequest} DeleteStatefileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteStatefileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteStatefileRequest message. + * @function verify + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteStatefileRequest.verify = function verify(message) { + if (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.lockId != null && message.hasOwnProperty("lockId")) + if (!$util.isInteger(message.lockId) && !(message.lockId && $util.isInteger(message.lockId.low) && $util.isInteger(message.lockId.high))) + return "lockId: integer|Long expected"; + return null; + }; + + /** + * Creates a DeleteStatefileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.DeleteStatefileRequest} DeleteStatefileRequest + */ + DeleteStatefileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.DeleteStatefileRequest) + return object; + var message = new $root.google.cloud.config.v1.DeleteStatefileRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.lockId != null) + if ($util.Long) + (message.lockId = $util.Long.fromValue(object.lockId)).unsigned = false; + else if (typeof object.lockId === "string") + message.lockId = parseInt(object.lockId, 10); + else if (typeof object.lockId === "number") + message.lockId = object.lockId; + else if (typeof object.lockId === "object") + message.lockId = new $util.LongBits(object.lockId.low >>> 0, object.lockId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DeleteStatefileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @static + * @param {google.cloud.config.v1.DeleteStatefileRequest} message DeleteStatefileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteStatefileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lockId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lockId = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.lockId != null && message.hasOwnProperty("lockId")) + if (typeof message.lockId === "number") + object.lockId = options.longs === String ? String(message.lockId) : message.lockId; + else + object.lockId = options.longs === String ? $util.Long.prototype.toString.call(message.lockId) : options.longs === Number ? new $util.LongBits(message.lockId.low >>> 0, message.lockId.high >>> 0).toNumber() : message.lockId; + return object; + }; + + /** + * Converts this DeleteStatefileRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteStatefileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteStatefileRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.DeleteStatefileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteStatefileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.DeleteStatefileRequest"; + }; + + return DeleteStatefileRequest; + })(); + + v1.LockDeploymentRequest = (function() { + + /** + * Properties of a LockDeploymentRequest. + * @memberof google.cloud.config.v1 + * @interface ILockDeploymentRequest + * @property {string|null} [name] LockDeploymentRequest name + */ + + /** + * Constructs a new LockDeploymentRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a LockDeploymentRequest. + * @implements ILockDeploymentRequest + * @constructor + * @param {google.cloud.config.v1.ILockDeploymentRequest=} [properties] Properties to set + */ + function LockDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.LockDeploymentRequest + * @instance + */ + LockDeploymentRequest.prototype.name = ""; + + /** + * Creates a new LockDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.LockDeploymentRequest + * @static + * @param {google.cloud.config.v1.ILockDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.LockDeploymentRequest} LockDeploymentRequest instance + */ + LockDeploymentRequest.create = function create(properties) { + return new LockDeploymentRequest(properties); + }; + + /** + * Encodes the specified LockDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.LockDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.LockDeploymentRequest + * @static + * @param {google.cloud.config.v1.ILockDeploymentRequest} message LockDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockDeploymentRequest.encode = function encode(message, writer) { + 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 LockDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.LockDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.LockDeploymentRequest + * @static + * @param {google.cloud.config.v1.ILockDeploymentRequest} message LockDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.LockDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.LockDeploymentRequest} LockDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockDeploymentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.LockDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LockDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.LockDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.LockDeploymentRequest} LockDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockDeploymentRequest message. + * @function verify + * @memberof google.cloud.config.v1.LockDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockDeploymentRequest.verify = function verify(message) { + if (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 LockDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.LockDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.LockDeploymentRequest} LockDeploymentRequest + */ + LockDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.LockDeploymentRequest) + return object; + var message = new $root.google.cloud.config.v1.LockDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a LockDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.LockDeploymentRequest + * @static + * @param {google.cloud.config.v1.LockDeploymentRequest} message LockDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockDeploymentRequest.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 LockDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.LockDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + LockDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.LockDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.LockDeploymentRequest"; + }; + + return LockDeploymentRequest; + })(); + + v1.UnlockDeploymentRequest = (function() { + + /** + * Properties of an UnlockDeploymentRequest. + * @memberof google.cloud.config.v1 + * @interface IUnlockDeploymentRequest + * @property {string|null} [name] UnlockDeploymentRequest name + * @property {number|Long|null} [lockId] UnlockDeploymentRequest lockId + */ + + /** + * Constructs a new UnlockDeploymentRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents an UnlockDeploymentRequest. + * @implements IUnlockDeploymentRequest + * @constructor + * @param {google.cloud.config.v1.IUnlockDeploymentRequest=} [properties] Properties to set + */ + function UnlockDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnlockDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @instance + */ + UnlockDeploymentRequest.prototype.name = ""; + + /** + * UnlockDeploymentRequest lockId. + * @member {number|Long} lockId + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @instance + */ + UnlockDeploymentRequest.prototype.lockId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new UnlockDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @static + * @param {google.cloud.config.v1.IUnlockDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.UnlockDeploymentRequest} UnlockDeploymentRequest instance + */ + UnlockDeploymentRequest.create = function create(properties) { + return new UnlockDeploymentRequest(properties); + }; + + /** + * Encodes the specified UnlockDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.UnlockDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @static + * @param {google.cloud.config.v1.IUnlockDeploymentRequest} message UnlockDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnlockDeploymentRequest.encode = function encode(message, writer) { + 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.lockId != null && Object.hasOwnProperty.call(message, "lockId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lockId); + return writer; + }; + + /** + * Encodes the specified UnlockDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UnlockDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @static + * @param {google.cloud.config.v1.IUnlockDeploymentRequest} message UnlockDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnlockDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnlockDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.UnlockDeploymentRequest} UnlockDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnlockDeploymentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.UnlockDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.lockId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnlockDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.UnlockDeploymentRequest} UnlockDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnlockDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnlockDeploymentRequest message. + * @function verify + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnlockDeploymentRequest.verify = function verify(message) { + if (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.lockId != null && message.hasOwnProperty("lockId")) + if (!$util.isInteger(message.lockId) && !(message.lockId && $util.isInteger(message.lockId.low) && $util.isInteger(message.lockId.high))) + return "lockId: integer|Long expected"; + return null; + }; + + /** + * Creates an UnlockDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.UnlockDeploymentRequest} UnlockDeploymentRequest + */ + UnlockDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.UnlockDeploymentRequest) + return object; + var message = new $root.google.cloud.config.v1.UnlockDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.lockId != null) + if ($util.Long) + (message.lockId = $util.Long.fromValue(object.lockId)).unsigned = false; + else if (typeof object.lockId === "string") + message.lockId = parseInt(object.lockId, 10); + else if (typeof object.lockId === "number") + message.lockId = object.lockId; + else if (typeof object.lockId === "object") + message.lockId = new $util.LongBits(object.lockId.low >>> 0, object.lockId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an UnlockDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @static + * @param {google.cloud.config.v1.UnlockDeploymentRequest} message UnlockDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnlockDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lockId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lockId = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.lockId != null && message.hasOwnProperty("lockId")) + if (typeof message.lockId === "number") + object.lockId = options.longs === String ? String(message.lockId) : message.lockId; + else + object.lockId = options.longs === String ? $util.Long.prototype.toString.call(message.lockId) : options.longs === Number ? new $util.LongBits(message.lockId.low >>> 0, message.lockId.high >>> 0).toNumber() : message.lockId; + return object; + }; + + /** + * Converts this UnlockDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + UnlockDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UnlockDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.UnlockDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UnlockDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.UnlockDeploymentRequest"; + }; + + return UnlockDeploymentRequest; + })(); + + v1.ExportLockInfoRequest = (function() { + + /** + * Properties of an ExportLockInfoRequest. + * @memberof google.cloud.config.v1 + * @interface IExportLockInfoRequest + * @property {string|null} [name] ExportLockInfoRequest name + */ + + /** + * Constructs a new ExportLockInfoRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents an ExportLockInfoRequest. + * @implements IExportLockInfoRequest + * @constructor + * @param {google.cloud.config.v1.IExportLockInfoRequest=} [properties] Properties to set + */ + function ExportLockInfoRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportLockInfoRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.ExportLockInfoRequest + * @instance + */ + ExportLockInfoRequest.prototype.name = ""; + + /** + * Creates a new ExportLockInfoRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ExportLockInfoRequest + * @static + * @param {google.cloud.config.v1.IExportLockInfoRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ExportLockInfoRequest} ExportLockInfoRequest instance + */ + ExportLockInfoRequest.create = function create(properties) { + return new ExportLockInfoRequest(properties); + }; + + /** + * Encodes the specified ExportLockInfoRequest message. Does not implicitly {@link google.cloud.config.v1.ExportLockInfoRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ExportLockInfoRequest + * @static + * @param {google.cloud.config.v1.IExportLockInfoRequest} message ExportLockInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLockInfoRequest.encode = function encode(message, writer) { + 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 ExportLockInfoRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportLockInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ExportLockInfoRequest + * @static + * @param {google.cloud.config.v1.IExportLockInfoRequest} message ExportLockInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLockInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportLockInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ExportLockInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ExportLockInfoRequest} ExportLockInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLockInfoRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ExportLockInfoRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportLockInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ExportLockInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ExportLockInfoRequest} ExportLockInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLockInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportLockInfoRequest message. + * @function verify + * @memberof google.cloud.config.v1.ExportLockInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportLockInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an ExportLockInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ExportLockInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ExportLockInfoRequest} ExportLockInfoRequest + */ + ExportLockInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ExportLockInfoRequest) + return object; + var message = new $root.google.cloud.config.v1.ExportLockInfoRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an ExportLockInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ExportLockInfoRequest + * @static + * @param {google.cloud.config.v1.ExportLockInfoRequest} message ExportLockInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportLockInfoRequest.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 ExportLockInfoRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ExportLockInfoRequest + * @instance + * @returns {Object.} JSON object + */ + ExportLockInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportLockInfoRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ExportLockInfoRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportLockInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ExportLockInfoRequest"; + }; + + return ExportLockInfoRequest; + })(); + + v1.LockInfo = (function() { + + /** + * Properties of a LockInfo. + * @memberof google.cloud.config.v1 + * @interface ILockInfo + * @property {number|Long|null} [lockId] LockInfo lockId + * @property {string|null} [operation] LockInfo operation + * @property {string|null} [info] LockInfo info + * @property {string|null} [who] LockInfo who + * @property {string|null} [version] LockInfo version + * @property {google.protobuf.ITimestamp|null} [createTime] LockInfo createTime + */ + + /** + * Constructs a new LockInfo. + * @memberof google.cloud.config.v1 + * @classdesc Represents a LockInfo. + * @implements ILockInfo + * @constructor + * @param {google.cloud.config.v1.ILockInfo=} [properties] Properties to set + */ + function LockInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockInfo lockId. + * @member {number|Long} lockId + * @memberof google.cloud.config.v1.LockInfo + * @instance + */ + LockInfo.prototype.lockId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LockInfo operation. + * @member {string} operation + * @memberof google.cloud.config.v1.LockInfo + * @instance + */ + LockInfo.prototype.operation = ""; + + /** + * LockInfo info. + * @member {string} info + * @memberof google.cloud.config.v1.LockInfo + * @instance + */ + LockInfo.prototype.info = ""; + + /** + * LockInfo who. + * @member {string} who + * @memberof google.cloud.config.v1.LockInfo + * @instance + */ + LockInfo.prototype.who = ""; + + /** + * LockInfo version. + * @member {string} version + * @memberof google.cloud.config.v1.LockInfo + * @instance + */ + LockInfo.prototype.version = ""; + + /** + * LockInfo createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.config.v1.LockInfo + * @instance + */ + LockInfo.prototype.createTime = null; + + /** + * Creates a new LockInfo instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.LockInfo + * @static + * @param {google.cloud.config.v1.ILockInfo=} [properties] Properties to set + * @returns {google.cloud.config.v1.LockInfo} LockInfo instance + */ + LockInfo.create = function create(properties) { + return new LockInfo(properties); + }; + + /** + * Encodes the specified LockInfo message. Does not implicitly {@link google.cloud.config.v1.LockInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.LockInfo + * @static + * @param {google.cloud.config.v1.ILockInfo} message LockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lockId != null && Object.hasOwnProperty.call(message, "lockId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.lockId); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.operation); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.info); + if (message.who != null && Object.hasOwnProperty.call(message, "who")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.who); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LockInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.LockInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.LockInfo + * @static + * @param {google.cloud.config.v1.ILockInfo} message LockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.LockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.LockInfo} LockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.LockInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.lockId = reader.int64(); + break; + } + case 2: { + message.operation = reader.string(); + break; + } + case 3: { + message.info = reader.string(); + break; + } + case 4: { + message.who = reader.string(); + break; + } + case 5: { + message.version = reader.string(); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LockInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.LockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.LockInfo} LockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockInfo message. + * @function verify + * @memberof google.cloud.config.v1.LockInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lockId != null && message.hasOwnProperty("lockId")) + if (!$util.isInteger(message.lockId) && !(message.lockId && $util.isInteger(message.lockId.low) && $util.isInteger(message.lockId.high))) + return "lockId: integer|Long expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + if (!$util.isString(message.operation)) + return "operation: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.who != null && message.hasOwnProperty("who")) + if (!$util.isString(message.who)) + return "who: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; + + /** + * Creates a LockInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.LockInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.LockInfo} LockInfo + */ + LockInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.LockInfo) + return object; + var message = new $root.google.cloud.config.v1.LockInfo(); + if (object.lockId != null) + if ($util.Long) + (message.lockId = $util.Long.fromValue(object.lockId)).unsigned = false; + else if (typeof object.lockId === "string") + message.lockId = parseInt(object.lockId, 10); + else if (typeof object.lockId === "number") + message.lockId = object.lockId; + else if (typeof object.lockId === "object") + message.lockId = new $util.LongBits(object.lockId.low >>> 0, object.lockId.high >>> 0).toNumber(); + if (object.operation != null) + message.operation = String(object.operation); + if (object.info != null) + message.info = String(object.info); + if (object.who != null) + message.who = String(object.who); + if (object.version != null) + message.version = String(object.version); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.config.v1.LockInfo.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; + + /** + * Creates a plain object from a LockInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.LockInfo + * @static + * @param {google.cloud.config.v1.LockInfo} message LockInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockInfo.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.lockId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lockId = options.longs === String ? "0" : 0; + object.operation = ""; + object.info = ""; + object.who = ""; + object.version = ""; + object.createTime = null; + } + if (message.lockId != null && message.hasOwnProperty("lockId")) + if (typeof message.lockId === "number") + object.lockId = options.longs === String ? String(message.lockId) : message.lockId; + else + object.lockId = options.longs === String ? $util.Long.prototype.toString.call(message.lockId) : options.longs === Number ? new $util.LongBits(message.lockId.low >>> 0, message.lockId.high >>> 0).toNumber() : message.lockId; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.who != null && message.hasOwnProperty("who")) + object.who = message.who; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; + + /** + * Converts this LockInfo to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.LockInfo + * @instance + * @returns {Object.} JSON object + */ + LockInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockInfo + * @function getTypeUrl + * @memberof google.cloud.config.v1.LockInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.LockInfo"; + }; + + return LockInfo; + })(); + + v1.Preview = (function() { + + /** + * Properties of a Preview. + * @memberof google.cloud.config.v1 + * @interface IPreview + * @property {google.cloud.config.v1.ITerraformBlueprint|null} [terraformBlueprint] Preview terraformBlueprint + * @property {string|null} [name] Preview name + * @property {google.protobuf.ITimestamp|null} [createTime] Preview createTime + * @property {Object.|null} [labels] Preview labels + * @property {google.cloud.config.v1.Preview.State|null} [state] Preview state + * @property {string|null} [deployment] Preview deployment + * @property {google.cloud.config.v1.Preview.PreviewMode|null} [previewMode] Preview previewMode + * @property {string|null} [serviceAccount] Preview serviceAccount + * @property {string|null} [artifactsGcsBucket] Preview artifactsGcsBucket + * @property {string|null} [workerPool] Preview workerPool + * @property {google.cloud.config.v1.Preview.ErrorCode|null} [errorCode] Preview errorCode + * @property {google.rpc.IStatus|null} [errorStatus] Preview errorStatus + * @property {string|null} [build] Preview build + * @property {Array.|null} [tfErrors] Preview tfErrors + * @property {string|null} [errorLogs] Preview errorLogs + * @property {google.cloud.config.v1.IPreviewArtifacts|null} [previewArtifacts] Preview previewArtifacts + * @property {string|null} [logs] Preview logs + * @property {string|null} [tfVersion] Preview tfVersion + * @property {string|null} [tfVersionConstraint] Preview tfVersionConstraint + * @property {Object.|null} [annotations] Preview annotations + * @property {google.cloud.config.v1.IProviderConfig|null} [providerConfig] Preview providerConfig + */ + + /** + * Constructs a new Preview. + * @memberof google.cloud.config.v1 + * @classdesc Represents a Preview. + * @implements IPreview + * @constructor + * @param {google.cloud.config.v1.IPreview=} [properties] Properties to set + */ + function Preview(properties) { + this.labels = {}; + this.tfErrors = []; + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Preview terraformBlueprint. + * @member {google.cloud.config.v1.ITerraformBlueprint|null|undefined} terraformBlueprint + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.terraformBlueprint = null; + + /** + * Preview name. + * @member {string} name + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.name = ""; + + /** + * Preview createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.createTime = null; + + /** + * Preview labels. + * @member {Object.} labels + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.labels = $util.emptyObject; + + /** + * Preview state. + * @member {google.cloud.config.v1.Preview.State} state + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.state = 0; + + /** + * Preview deployment. + * @member {string} deployment + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.deployment = ""; + + /** + * Preview previewMode. + * @member {google.cloud.config.v1.Preview.PreviewMode} previewMode + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.previewMode = 0; + + /** + * Preview serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.serviceAccount = ""; + + /** + * Preview artifactsGcsBucket. + * @member {string|null|undefined} artifactsGcsBucket + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.artifactsGcsBucket = null; + + /** + * Preview workerPool. + * @member {string|null|undefined} workerPool + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.workerPool = null; + + /** + * Preview errorCode. + * @member {google.cloud.config.v1.Preview.ErrorCode} errorCode + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.errorCode = 0; + + /** + * Preview errorStatus. + * @member {google.rpc.IStatus|null|undefined} errorStatus + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.errorStatus = null; + + /** + * Preview build. + * @member {string} build + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.build = ""; + + /** + * Preview tfErrors. + * @member {Array.} tfErrors + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.tfErrors = $util.emptyArray; + + /** + * Preview errorLogs. + * @member {string} errorLogs + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.errorLogs = ""; + + /** + * Preview previewArtifacts. + * @member {google.cloud.config.v1.IPreviewArtifacts|null|undefined} previewArtifacts + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.previewArtifacts = null; + + /** + * Preview logs. + * @member {string} logs + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.logs = ""; + + /** + * Preview tfVersion. + * @member {string} tfVersion + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.tfVersion = ""; + + /** + * Preview tfVersionConstraint. + * @member {string|null|undefined} tfVersionConstraint + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.tfVersionConstraint = null; + + /** + * Preview annotations. + * @member {Object.} annotations + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.annotations = $util.emptyObject; + + /** + * Preview providerConfig. + * @member {google.cloud.config.v1.IProviderConfig|null|undefined} providerConfig + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Preview.prototype.providerConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Preview blueprint. + * @member {"terraformBlueprint"|undefined} blueprint + * @memberof google.cloud.config.v1.Preview + * @instance + */ + Object.defineProperty(Preview.prototype, "blueprint", { + get: $util.oneOfGetter($oneOfFields = ["terraformBlueprint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Preview.prototype, "_artifactsGcsBucket", { + get: $util.oneOfGetter($oneOfFields = ["artifactsGcsBucket"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Preview.prototype, "_workerPool", { + get: $util.oneOfGetter($oneOfFields = ["workerPool"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Preview.prototype, "_tfVersionConstraint", { + get: $util.oneOfGetter($oneOfFields = ["tfVersionConstraint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Preview instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.Preview + * @static + * @param {google.cloud.config.v1.IPreview=} [properties] Properties to set + * @returns {google.cloud.config.v1.Preview} Preview instance + */ + Preview.create = function create(properties) { + return new Preview(properties); + }; + + /** + * Encodes the specified Preview message. Does not implicitly {@link google.cloud.config.v1.Preview.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.Preview + * @static + * @param {google.cloud.config.v1.IPreview} message Preview message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Preview.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.deployment); + if (message.terraformBlueprint != null && Object.hasOwnProperty.call(message, "terraformBlueprint")) + $root.google.cloud.config.v1.TerraformBlueprint.encode(message.terraformBlueprint, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccount); + if (message.artifactsGcsBucket != null && Object.hasOwnProperty.call(message, "artifactsGcsBucket")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.artifactsGcsBucket); + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.workerPool); + if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.errorCode); + if (message.errorStatus != null && Object.hasOwnProperty.call(message, "errorStatus")) + $root.google.rpc.Status.encode(message.errorStatus, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.build); + if (message.tfErrors != null && message.tfErrors.length) + for (var i = 0; i < message.tfErrors.length; ++i) + $root.google.cloud.config.v1.TerraformError.encode(message.tfErrors[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.errorLogs != null && Object.hasOwnProperty.call(message, "errorLogs")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.errorLogs); + if (message.previewMode != null && Object.hasOwnProperty.call(message, "previewMode")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.previewMode); + if (message.previewArtifacts != null && Object.hasOwnProperty.call(message, "previewArtifacts")) + $root.google.cloud.config.v1.PreviewArtifacts.encode(message.previewArtifacts, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.logs != null && Object.hasOwnProperty.call(message, "logs")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.logs); + if (message.tfVersion != null && Object.hasOwnProperty.call(message, "tfVersion")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.tfVersion); + if (message.tfVersionConstraint != null && Object.hasOwnProperty.call(message, "tfVersionConstraint")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.tfVersionConstraint); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.providerConfig != null && Object.hasOwnProperty.call(message, "providerConfig")) + $root.google.cloud.config.v1.ProviderConfig.encode(message.providerConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Preview message, length delimited. Does not implicitly {@link google.cloud.config.v1.Preview.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.Preview + * @static + * @param {google.cloud.config.v1.IPreview} message Preview message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Preview.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Preview message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.Preview + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.Preview} Preview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Preview.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.Preview(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 6: { + message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.deployment = reader.string(); + break; + } + case 15: { + message.previewMode = reader.int32(); + break; + } + case 7: { + message.serviceAccount = reader.string(); + break; + } + case 8: { + message.artifactsGcsBucket = reader.string(); + break; + } + case 9: { + message.workerPool = reader.string(); + break; + } + case 10: { + message.errorCode = reader.int32(); + break; + } + case 11: { + message.errorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 12: { + message.build = reader.string(); + break; + } + case 13: { + if (!(message.tfErrors && message.tfErrors.length)) + message.tfErrors = []; + message.tfErrors.push($root.google.cloud.config.v1.TerraformError.decode(reader, reader.uint32())); + break; + } + case 14: { + message.errorLogs = reader.string(); + break; + } + case 16: { + message.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.decode(reader, reader.uint32()); + break; + } + case 17: { + message.logs = reader.string(); + break; + } + case 18: { + message.tfVersion = reader.string(); + break; + } + case 19: { + message.tfVersionConstraint = reader.string(); + break; + } + case 20: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + } + case 21: { + message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Preview message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.Preview + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.Preview} Preview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Preview.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Preview message. + * @function verify + * @memberof google.cloud.config.v1.Preview + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Preview.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { + properties.blueprint = 1; + { + var error = $root.google.cloud.config.v1.TerraformBlueprint.verify(message.terraformBlueprint); + if (error) + return "terraformBlueprint." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.deployment != null && message.hasOwnProperty("deployment")) + if (!$util.isString(message.deployment)) + return "deployment: string expected"; + if (message.previewMode != null && message.hasOwnProperty("previewMode")) + switch (message.previewMode) { + default: + return "previewMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.artifactsGcsBucket != null && message.hasOwnProperty("artifactsGcsBucket")) { + properties._artifactsGcsBucket = 1; + if (!$util.isString(message.artifactsGcsBucket)) + return "artifactsGcsBucket: string expected"; + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) { + properties._workerPool = 1; + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + } + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + switch (message.errorCode) { + default: + return "errorCode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) { + var error = $root.google.rpc.Status.verify(message.errorStatus); + if (error) + return "errorStatus." + error; + } + if (message.build != null && message.hasOwnProperty("build")) + if (!$util.isString(message.build)) + return "build: string expected"; + if (message.tfErrors != null && message.hasOwnProperty("tfErrors")) { + if (!Array.isArray(message.tfErrors)) + return "tfErrors: array expected"; + for (var i = 0; i < message.tfErrors.length; ++i) { + var error = $root.google.cloud.config.v1.TerraformError.verify(message.tfErrors[i]); + if (error) + return "tfErrors." + error; + } + } + if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) + if (!$util.isString(message.errorLogs)) + return "errorLogs: string expected"; + if (message.previewArtifacts != null && message.hasOwnProperty("previewArtifacts")) { + var error = $root.google.cloud.config.v1.PreviewArtifacts.verify(message.previewArtifacts); + if (error) + return "previewArtifacts." + error; + } + if (message.logs != null && message.hasOwnProperty("logs")) + if (!$util.isString(message.logs)) + return "logs: string expected"; + if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) + if (!$util.isString(message.tfVersion)) + return "tfVersion: string expected"; + if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) { + properties._tfVersionConstraint = 1; + if (!$util.isString(message.tfVersionConstraint)) + return "tfVersionConstraint: string expected"; + } + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) { + var error = $root.google.cloud.config.v1.ProviderConfig.verify(message.providerConfig); + if (error) + return "providerConfig." + error; + } + return null; + }; + + /** + * Creates a Preview message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.Preview + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.Preview} Preview + */ + Preview.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.Preview) + return object; + var message = new $root.google.cloud.config.v1.Preview(); + if (object.terraformBlueprint != null) { + if (typeof object.terraformBlueprint !== "object") + throw TypeError(".google.cloud.config.v1.Preview.terraformBlueprint: object expected"); + message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.fromObject(object.terraformBlueprint); + } + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.config.v1.Preview.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.config.v1.Preview.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "APPLYING": + case 3: + message.state = 3; + break; + case "STALE": + case 4: + message.state = 4; + break; + case "DELETING": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + case "DELETED": + case 7: + message.state = 7; + break; + } + if (object.deployment != null) + message.deployment = String(object.deployment); + switch (object.previewMode) { + default: + if (typeof object.previewMode === "number") { + message.previewMode = object.previewMode; + break; + } + break; + case "PREVIEW_MODE_UNSPECIFIED": + case 0: + message.previewMode = 0; + break; + case "DEFAULT": + case 1: + message.previewMode = 1; + break; + case "DELETE": + case 2: + message.previewMode = 2; + break; + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.artifactsGcsBucket != null) + message.artifactsGcsBucket = String(object.artifactsGcsBucket); + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + switch (object.errorCode) { + default: + if (typeof object.errorCode === "number") { + message.errorCode = object.errorCode; + break; + } + break; + case "ERROR_CODE_UNSPECIFIED": + case 0: + message.errorCode = 0; + break; + case "CLOUD_BUILD_PERMISSION_DENIED": + case 1: + message.errorCode = 1; + break; + case "BUCKET_CREATION_PERMISSION_DENIED": + case 2: + message.errorCode = 2; + break; + case "BUCKET_CREATION_FAILED": + case 3: + message.errorCode = 3; + break; + case "DEPLOYMENT_LOCK_ACQUIRE_FAILED": + case 4: + message.errorCode = 4; + break; + case "PREVIEW_BUILD_API_FAILED": + case 5: + message.errorCode = 5; + break; + case "PREVIEW_BUILD_RUN_FAILED": + case 6: + message.errorCode = 6; + break; + case "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": + case 7: + message.errorCode = 7; + break; + } + if (object.errorStatus != null) { + if (typeof object.errorStatus !== "object") + throw TypeError(".google.cloud.config.v1.Preview.errorStatus: object expected"); + message.errorStatus = $root.google.rpc.Status.fromObject(object.errorStatus); + } + if (object.build != null) + message.build = String(object.build); + if (object.tfErrors) { + if (!Array.isArray(object.tfErrors)) + throw TypeError(".google.cloud.config.v1.Preview.tfErrors: array expected"); + message.tfErrors = []; + for (var i = 0; i < object.tfErrors.length; ++i) { + if (typeof object.tfErrors[i] !== "object") + throw TypeError(".google.cloud.config.v1.Preview.tfErrors: object expected"); + message.tfErrors[i] = $root.google.cloud.config.v1.TerraformError.fromObject(object.tfErrors[i]); + } + } + if (object.errorLogs != null) + message.errorLogs = String(object.errorLogs); + if (object.previewArtifacts != null) { + if (typeof object.previewArtifacts !== "object") + throw TypeError(".google.cloud.config.v1.Preview.previewArtifacts: object expected"); + message.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.fromObject(object.previewArtifacts); + } + if (object.logs != null) + message.logs = String(object.logs); + if (object.tfVersion != null) + message.tfVersion = String(object.tfVersion); + if (object.tfVersionConstraint != null) + message.tfVersionConstraint = String(object.tfVersionConstraint); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.config.v1.Preview.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.providerConfig != null) { + if (typeof object.providerConfig !== "object") + throw TypeError(".google.cloud.config.v1.Preview.providerConfig: object expected"); + message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.fromObject(object.providerConfig); + } + return message; + }; + + /** + * Creates a plain object from a Preview message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.Preview + * @static + * @param {google.cloud.config.v1.Preview} message Preview + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Preview.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tfErrors = []; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.deployment = ""; + object.serviceAccount = ""; + object.errorCode = options.enums === String ? "ERROR_CODE_UNSPECIFIED" : 0; + object.errorStatus = null; + object.build = ""; + object.errorLogs = ""; + object.previewMode = options.enums === String ? "PREVIEW_MODE_UNSPECIFIED" : 0; + object.previewArtifacts = null; + object.logs = ""; + object.tfVersion = ""; + object.providerConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.config.v1.Preview.State[message.state] === undefined ? message.state : $root.google.cloud.config.v1.Preview.State[message.state] : message.state; + if (message.deployment != null && message.hasOwnProperty("deployment")) + object.deployment = message.deployment; + if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { + object.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.toObject(message.terraformBlueprint, options); + if (options.oneofs) + object.blueprint = "terraformBlueprint"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.artifactsGcsBucket != null && message.hasOwnProperty("artifactsGcsBucket")) { + object.artifactsGcsBucket = message.artifactsGcsBucket; + if (options.oneofs) + object._artifactsGcsBucket = "artifactsGcsBucket"; + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) { + object.workerPool = message.workerPool; + if (options.oneofs) + object._workerPool = "workerPool"; + } + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + object.errorCode = options.enums === String ? $root.google.cloud.config.v1.Preview.ErrorCode[message.errorCode] === undefined ? message.errorCode : $root.google.cloud.config.v1.Preview.ErrorCode[message.errorCode] : message.errorCode; + if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) + object.errorStatus = $root.google.rpc.Status.toObject(message.errorStatus, options); + if (message.build != null && message.hasOwnProperty("build")) + object.build = message.build; + if (message.tfErrors && message.tfErrors.length) { + object.tfErrors = []; + for (var j = 0; j < message.tfErrors.length; ++j) + object.tfErrors[j] = $root.google.cloud.config.v1.TerraformError.toObject(message.tfErrors[j], options); + } + if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) + object.errorLogs = message.errorLogs; + if (message.previewMode != null && message.hasOwnProperty("previewMode")) + object.previewMode = options.enums === String ? $root.google.cloud.config.v1.Preview.PreviewMode[message.previewMode] === undefined ? message.previewMode : $root.google.cloud.config.v1.Preview.PreviewMode[message.previewMode] : message.previewMode; + if (message.previewArtifacts != null && message.hasOwnProperty("previewArtifacts")) + object.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.toObject(message.previewArtifacts, options); + if (message.logs != null && message.hasOwnProperty("logs")) + object.logs = message.logs; + if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) + object.tfVersion = message.tfVersion; + if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) { + object.tfVersionConstraint = message.tfVersionConstraint; + if (options.oneofs) + object._tfVersionConstraint = "tfVersionConstraint"; + } + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) + object.providerConfig = $root.google.cloud.config.v1.ProviderConfig.toObject(message.providerConfig, options); + return object; + }; + + /** + * Converts this Preview to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.Preview + * @instance + * @returns {Object.} JSON object + */ + Preview.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Preview + * @function getTypeUrl + * @memberof google.cloud.config.v1.Preview + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Preview.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.Preview"; + }; + + /** + * State enum. + * @name google.cloud.config.v1.Preview.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} APPLYING=3 APPLYING value + * @property {number} STALE=4 STALE value + * @property {number} DELETING=5 DELETING value + * @property {number} FAILED=6 FAILED value + * @property {number} DELETED=7 DELETED value + */ + Preview.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "APPLYING"] = 3; + values[valuesById[4] = "STALE"] = 4; + values[valuesById[5] = "DELETING"] = 5; + values[valuesById[6] = "FAILED"] = 6; + values[valuesById[7] = "DELETED"] = 7; + return values; + })(); + + /** + * PreviewMode enum. + * @name google.cloud.config.v1.Preview.PreviewMode + * @enum {number} + * @property {number} PREVIEW_MODE_UNSPECIFIED=0 PREVIEW_MODE_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} DELETE=2 DELETE value + */ + Preview.PreviewMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PREVIEW_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "DELETE"] = 2; + return values; + })(); + + /** + * ErrorCode enum. + * @name google.cloud.config.v1.Preview.ErrorCode + * @enum {number} + * @property {number} ERROR_CODE_UNSPECIFIED=0 ERROR_CODE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_PERMISSION_DENIED=1 CLOUD_BUILD_PERMISSION_DENIED value + * @property {number} BUCKET_CREATION_PERMISSION_DENIED=2 BUCKET_CREATION_PERMISSION_DENIED value + * @property {number} BUCKET_CREATION_FAILED=3 BUCKET_CREATION_FAILED value + * @property {number} DEPLOYMENT_LOCK_ACQUIRE_FAILED=4 DEPLOYMENT_LOCK_ACQUIRE_FAILED value + * @property {number} PREVIEW_BUILD_API_FAILED=5 PREVIEW_BUILD_API_FAILED value + * @property {number} PREVIEW_BUILD_RUN_FAILED=6 PREVIEW_BUILD_RUN_FAILED value + * @property {number} EXTERNAL_VALUE_SOURCE_IMPORT_FAILED=7 EXTERNAL_VALUE_SOURCE_IMPORT_FAILED value + */ + Preview.ErrorCode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERROR_CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_PERMISSION_DENIED"] = 1; + values[valuesById[2] = "BUCKET_CREATION_PERMISSION_DENIED"] = 2; + values[valuesById[3] = "BUCKET_CREATION_FAILED"] = 3; + values[valuesById[4] = "DEPLOYMENT_LOCK_ACQUIRE_FAILED"] = 4; + values[valuesById[5] = "PREVIEW_BUILD_API_FAILED"] = 5; + values[valuesById[6] = "PREVIEW_BUILD_RUN_FAILED"] = 6; + values[valuesById[7] = "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED"] = 7; + return values; + })(); + + return Preview; + })(); + + v1.PreviewOperationMetadata = (function() { + + /** + * Properties of a PreviewOperationMetadata. + * @memberof google.cloud.config.v1 + * @interface IPreviewOperationMetadata + * @property {google.cloud.config.v1.PreviewOperationMetadata.PreviewStep|null} [step] PreviewOperationMetadata step + * @property {google.cloud.config.v1.IPreviewArtifacts|null} [previewArtifacts] PreviewOperationMetadata previewArtifacts + * @property {string|null} [logs] PreviewOperationMetadata logs + * @property {string|null} [build] PreviewOperationMetadata build + */ + + /** + * Constructs a new PreviewOperationMetadata. + * @memberof google.cloud.config.v1 + * @classdesc Represents a PreviewOperationMetadata. + * @implements IPreviewOperationMetadata + * @constructor + * @param {google.cloud.config.v1.IPreviewOperationMetadata=} [properties] Properties to set + */ + function PreviewOperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PreviewOperationMetadata step. + * @member {google.cloud.config.v1.PreviewOperationMetadata.PreviewStep} step + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @instance + */ + PreviewOperationMetadata.prototype.step = 0; + + /** + * PreviewOperationMetadata previewArtifacts. + * @member {google.cloud.config.v1.IPreviewArtifacts|null|undefined} previewArtifacts + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @instance + */ + PreviewOperationMetadata.prototype.previewArtifacts = null; + + /** + * PreviewOperationMetadata logs. + * @member {string} logs + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @instance + */ + PreviewOperationMetadata.prototype.logs = ""; + + /** + * PreviewOperationMetadata build. + * @member {string} build + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @instance + */ + PreviewOperationMetadata.prototype.build = ""; + + /** + * Creates a new PreviewOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @static + * @param {google.cloud.config.v1.IPreviewOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.config.v1.PreviewOperationMetadata} PreviewOperationMetadata instance + */ + PreviewOperationMetadata.create = function create(properties) { + return new PreviewOperationMetadata(properties); + }; + + /** + * Encodes the specified PreviewOperationMetadata message. Does not implicitly {@link google.cloud.config.v1.PreviewOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @static + * @param {google.cloud.config.v1.IPreviewOperationMetadata} message PreviewOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviewOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.step != null && Object.hasOwnProperty.call(message, "step")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.step); + if (message.previewArtifacts != null && Object.hasOwnProperty.call(message, "previewArtifacts")) + $root.google.cloud.config.v1.PreviewArtifacts.encode(message.previewArtifacts, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.logs != null && Object.hasOwnProperty.call(message, "logs")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.logs); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.build); + return writer; + }; + + /** + * Encodes the specified PreviewOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @static + * @param {google.cloud.config.v1.IPreviewOperationMetadata} message PreviewOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviewOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreviewOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.PreviewOperationMetadata} PreviewOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviewOperationMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PreviewOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.step = reader.int32(); + break; + } + case 2: { + message.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.decode(reader, reader.uint32()); + break; + } + case 3: { + message.logs = reader.string(); + break; + } + case 4: { + message.build = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PreviewOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.PreviewOperationMetadata} PreviewOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviewOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreviewOperationMetadata message. + * @function verify + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreviewOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.step != null && message.hasOwnProperty("step")) + switch (message.step) { + default: + return "step: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.previewArtifacts != null && message.hasOwnProperty("previewArtifacts")) { + var error = $root.google.cloud.config.v1.PreviewArtifacts.verify(message.previewArtifacts); + if (error) + return "previewArtifacts." + error; + } + if (message.logs != null && message.hasOwnProperty("logs")) + if (!$util.isString(message.logs)) + return "logs: string expected"; + if (message.build != null && message.hasOwnProperty("build")) + if (!$util.isString(message.build)) + return "build: string expected"; + return null; + }; + + /** + * Creates a PreviewOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.PreviewOperationMetadata} PreviewOperationMetadata + */ + PreviewOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.PreviewOperationMetadata) + return object; + var message = new $root.google.cloud.config.v1.PreviewOperationMetadata(); + switch (object.step) { + default: + if (typeof object.step === "number") { + message.step = object.step; + break; + } + break; + case "PREVIEW_STEP_UNSPECIFIED": + case 0: + message.step = 0; + break; + case "PREPARING_STORAGE_BUCKET": + case 1: + message.step = 1; + break; + case "DOWNLOADING_BLUEPRINT": + case 2: + message.step = 2; + break; + case "RUNNING_TF_INIT": + case 3: + message.step = 3; + break; + case "RUNNING_TF_PLAN": + case 4: + message.step = 4; + break; + case "FETCHING_DEPLOYMENT": + case 5: + message.step = 5; + break; + case "LOCKING_DEPLOYMENT": + case 6: + message.step = 6; + break; + case "UNLOCKING_DEPLOYMENT": + case 7: + message.step = 7; + break; + case "SUCCEEDED": + case 8: + message.step = 8; + break; + case "FAILED": + case 9: + message.step = 9; + break; + case "VALIDATING_REPOSITORY": + case 10: + message.step = 10; + break; + } + if (object.previewArtifacts != null) { + if (typeof object.previewArtifacts !== "object") + throw TypeError(".google.cloud.config.v1.PreviewOperationMetadata.previewArtifacts: object expected"); + message.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.fromObject(object.previewArtifacts); + } + if (object.logs != null) + message.logs = String(object.logs); + if (object.build != null) + message.build = String(object.build); + return message; + }; + + /** + * Creates a plain object from a PreviewOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @static + * @param {google.cloud.config.v1.PreviewOperationMetadata} message PreviewOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreviewOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.step = options.enums === String ? "PREVIEW_STEP_UNSPECIFIED" : 0; + object.previewArtifacts = null; + object.logs = ""; + object.build = ""; + } + if (message.step != null && message.hasOwnProperty("step")) + object.step = options.enums === String ? $root.google.cloud.config.v1.PreviewOperationMetadata.PreviewStep[message.step] === undefined ? message.step : $root.google.cloud.config.v1.PreviewOperationMetadata.PreviewStep[message.step] : message.step; + if (message.previewArtifacts != null && message.hasOwnProperty("previewArtifacts")) + object.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.toObject(message.previewArtifacts, options); + if (message.logs != null && message.hasOwnProperty("logs")) + object.logs = message.logs; + if (message.build != null && message.hasOwnProperty("build")) + object.build = message.build; + return object; + }; + + /** + * Converts this PreviewOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + PreviewOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PreviewOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.config.v1.PreviewOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreviewOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.PreviewOperationMetadata"; + }; + + /** + * PreviewStep enum. + * @name google.cloud.config.v1.PreviewOperationMetadata.PreviewStep + * @enum {number} + * @property {number} PREVIEW_STEP_UNSPECIFIED=0 PREVIEW_STEP_UNSPECIFIED value + * @property {number} PREPARING_STORAGE_BUCKET=1 PREPARING_STORAGE_BUCKET value + * @property {number} DOWNLOADING_BLUEPRINT=2 DOWNLOADING_BLUEPRINT value + * @property {number} RUNNING_TF_INIT=3 RUNNING_TF_INIT value + * @property {number} RUNNING_TF_PLAN=4 RUNNING_TF_PLAN value + * @property {number} FETCHING_DEPLOYMENT=5 FETCHING_DEPLOYMENT value + * @property {number} LOCKING_DEPLOYMENT=6 LOCKING_DEPLOYMENT value + * @property {number} UNLOCKING_DEPLOYMENT=7 UNLOCKING_DEPLOYMENT value + * @property {number} SUCCEEDED=8 SUCCEEDED value + * @property {number} FAILED=9 FAILED value + * @property {number} VALIDATING_REPOSITORY=10 VALIDATING_REPOSITORY value + */ + PreviewOperationMetadata.PreviewStep = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PREVIEW_STEP_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREPARING_STORAGE_BUCKET"] = 1; + values[valuesById[2] = "DOWNLOADING_BLUEPRINT"] = 2; + values[valuesById[3] = "RUNNING_TF_INIT"] = 3; + values[valuesById[4] = "RUNNING_TF_PLAN"] = 4; + values[valuesById[5] = "FETCHING_DEPLOYMENT"] = 5; + values[valuesById[6] = "LOCKING_DEPLOYMENT"] = 6; + values[valuesById[7] = "UNLOCKING_DEPLOYMENT"] = 7; + values[valuesById[8] = "SUCCEEDED"] = 8; + values[valuesById[9] = "FAILED"] = 9; + values[valuesById[10] = "VALIDATING_REPOSITORY"] = 10; + return values; + })(); + + return PreviewOperationMetadata; + })(); + + v1.PreviewArtifacts = (function() { + + /** + * Properties of a PreviewArtifacts. + * @memberof google.cloud.config.v1 + * @interface IPreviewArtifacts + * @property {string|null} [content] PreviewArtifacts content + * @property {string|null} [artifacts] PreviewArtifacts artifacts + */ + + /** + * Constructs a new PreviewArtifacts. + * @memberof google.cloud.config.v1 + * @classdesc Represents a PreviewArtifacts. + * @implements IPreviewArtifacts + * @constructor + * @param {google.cloud.config.v1.IPreviewArtifacts=} [properties] Properties to set + */ + function PreviewArtifacts(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PreviewArtifacts content. + * @member {string} content + * @memberof google.cloud.config.v1.PreviewArtifacts + * @instance + */ + PreviewArtifacts.prototype.content = ""; + + /** + * PreviewArtifacts artifacts. + * @member {string} artifacts + * @memberof google.cloud.config.v1.PreviewArtifacts + * @instance + */ + PreviewArtifacts.prototype.artifacts = ""; + + /** + * Creates a new PreviewArtifacts instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.PreviewArtifacts + * @static + * @param {google.cloud.config.v1.IPreviewArtifacts=} [properties] Properties to set + * @returns {google.cloud.config.v1.PreviewArtifacts} PreviewArtifacts instance + */ + PreviewArtifacts.create = function create(properties) { + return new PreviewArtifacts(properties); + }; + + /** + * Encodes the specified PreviewArtifacts message. Does not implicitly {@link google.cloud.config.v1.PreviewArtifacts.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.PreviewArtifacts + * @static + * @param {google.cloud.config.v1.IPreviewArtifacts} message PreviewArtifacts message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviewArtifacts.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.artifacts != null && Object.hasOwnProperty.call(message, "artifacts")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifacts); + return writer; + }; + + /** + * Encodes the specified PreviewArtifacts message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewArtifacts.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.PreviewArtifacts + * @static + * @param {google.cloud.config.v1.IPreviewArtifacts} message PreviewArtifacts message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviewArtifacts.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreviewArtifacts message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.PreviewArtifacts + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.PreviewArtifacts} PreviewArtifacts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviewArtifacts.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PreviewArtifacts(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.content = reader.string(); + break; + } + case 2: { + message.artifacts = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PreviewArtifacts message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.PreviewArtifacts + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.PreviewArtifacts} PreviewArtifacts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviewArtifacts.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreviewArtifacts message. + * @function verify + * @memberof google.cloud.config.v1.PreviewArtifacts + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreviewArtifacts.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.artifacts != null && message.hasOwnProperty("artifacts")) + if (!$util.isString(message.artifacts)) + return "artifacts: string expected"; + return null; + }; + + /** + * Creates a PreviewArtifacts message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.PreviewArtifacts + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.PreviewArtifacts} PreviewArtifacts + */ + PreviewArtifacts.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.PreviewArtifacts) + return object; + var message = new $root.google.cloud.config.v1.PreviewArtifacts(); + if (object.content != null) + message.content = String(object.content); + if (object.artifacts != null) + message.artifacts = String(object.artifacts); + return message; + }; + + /** + * Creates a plain object from a PreviewArtifacts message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.PreviewArtifacts + * @static + * @param {google.cloud.config.v1.PreviewArtifacts} message PreviewArtifacts + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreviewArtifacts.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.content = ""; + object.artifacts = ""; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.artifacts != null && message.hasOwnProperty("artifacts")) + object.artifacts = message.artifacts; + return object; + }; + + /** + * Converts this PreviewArtifacts to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.PreviewArtifacts + * @instance + * @returns {Object.} JSON object + */ + PreviewArtifacts.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PreviewArtifacts + * @function getTypeUrl + * @memberof google.cloud.config.v1.PreviewArtifacts + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreviewArtifacts.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.PreviewArtifacts"; + }; + + return PreviewArtifacts; + })(); + + v1.CreatePreviewRequest = (function() { + + /** + * Properties of a CreatePreviewRequest. + * @memberof google.cloud.config.v1 + * @interface ICreatePreviewRequest + * @property {string|null} [parent] CreatePreviewRequest parent + * @property {string|null} [previewId] CreatePreviewRequest previewId + * @property {google.cloud.config.v1.IPreview|null} [preview] CreatePreviewRequest preview + * @property {string|null} [requestId] CreatePreviewRequest requestId + */ + + /** + * Constructs a new CreatePreviewRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a CreatePreviewRequest. + * @implements ICreatePreviewRequest + * @constructor + * @param {google.cloud.config.v1.ICreatePreviewRequest=} [properties] Properties to set + */ + function CreatePreviewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePreviewRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @instance + */ + CreatePreviewRequest.prototype.parent = ""; + + /** + * CreatePreviewRequest previewId. + * @member {string} previewId + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @instance + */ + CreatePreviewRequest.prototype.previewId = ""; + + /** + * CreatePreviewRequest preview. + * @member {google.cloud.config.v1.IPreview|null|undefined} preview + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @instance + */ + CreatePreviewRequest.prototype.preview = null; + + /** + * CreatePreviewRequest requestId. + * @member {string} requestId + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @instance + */ + CreatePreviewRequest.prototype.requestId = ""; + + /** + * Creates a new CreatePreviewRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @static + * @param {google.cloud.config.v1.ICreatePreviewRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.CreatePreviewRequest} CreatePreviewRequest instance + */ + CreatePreviewRequest.create = function create(properties) { + return new CreatePreviewRequest(properties); + }; + + /** + * Encodes the specified CreatePreviewRequest message. Does not implicitly {@link google.cloud.config.v1.CreatePreviewRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @static + * @param {google.cloud.config.v1.ICreatePreviewRequest} message CreatePreviewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePreviewRequest.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.previewId != null && Object.hasOwnProperty.call(message, "previewId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.previewId); + if (message.preview != null && Object.hasOwnProperty.call(message, "preview")) + $root.google.cloud.config.v1.Preview.encode(message.preview, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreatePreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.CreatePreviewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @static + * @param {google.cloud.config.v1.ICreatePreviewRequest} message CreatePreviewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePreviewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePreviewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.CreatePreviewRequest} CreatePreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePreviewRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.CreatePreviewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.previewId = reader.string(); + break; + } + case 3: { + message.preview = $root.google.cloud.config.v1.Preview.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePreviewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.CreatePreviewRequest} CreatePreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePreviewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePreviewRequest message. + * @function verify + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePreviewRequest.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.previewId != null && message.hasOwnProperty("previewId")) + if (!$util.isString(message.previewId)) + return "previewId: string expected"; + if (message.preview != null && message.hasOwnProperty("preview")) { + var error = $root.google.cloud.config.v1.Preview.verify(message.preview); + if (error) + return "preview." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreatePreviewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.CreatePreviewRequest} CreatePreviewRequest + */ + CreatePreviewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.CreatePreviewRequest) + return object; + var message = new $root.google.cloud.config.v1.CreatePreviewRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.previewId != null) + message.previewId = String(object.previewId); + if (object.preview != null) { + if (typeof object.preview !== "object") + throw TypeError(".google.cloud.config.v1.CreatePreviewRequest.preview: object expected"); + message.preview = $root.google.cloud.config.v1.Preview.fromObject(object.preview); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreatePreviewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @static + * @param {google.cloud.config.v1.CreatePreviewRequest} message CreatePreviewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePreviewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.previewId = ""; + object.preview = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.previewId != null && message.hasOwnProperty("previewId")) + object.previewId = message.previewId; + if (message.preview != null && message.hasOwnProperty("preview")) + object.preview = $root.google.cloud.config.v1.Preview.toObject(message.preview, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreatePreviewRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePreviewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePreviewRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.CreatePreviewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePreviewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.CreatePreviewRequest"; + }; + + return CreatePreviewRequest; + })(); + + v1.GetPreviewRequest = (function() { + + /** + * Properties of a GetPreviewRequest. + * @memberof google.cloud.config.v1 + * @interface IGetPreviewRequest + * @property {string|null} [name] GetPreviewRequest name + */ + + /** + * Constructs a new GetPreviewRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GetPreviewRequest. + * @implements IGetPreviewRequest + * @constructor + * @param {google.cloud.config.v1.IGetPreviewRequest=} [properties] Properties to set + */ + function GetPreviewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPreviewRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.GetPreviewRequest + * @instance + */ + GetPreviewRequest.prototype.name = ""; + + /** + * Creates a new GetPreviewRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GetPreviewRequest + * @static + * @param {google.cloud.config.v1.IGetPreviewRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.GetPreviewRequest} GetPreviewRequest instance + */ + GetPreviewRequest.create = function create(properties) { + return new GetPreviewRequest(properties); + }; + + /** + * Encodes the specified GetPreviewRequest message. Does not implicitly {@link google.cloud.config.v1.GetPreviewRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GetPreviewRequest + * @static + * @param {google.cloud.config.v1.IGetPreviewRequest} message GetPreviewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPreviewRequest.encode = function encode(message, writer) { + 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 GetPreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetPreviewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GetPreviewRequest + * @static + * @param {google.cloud.config.v1.IGetPreviewRequest} message GetPreviewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPreviewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPreviewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GetPreviewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GetPreviewRequest} GetPreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPreviewRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetPreviewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPreviewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GetPreviewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GetPreviewRequest} GetPreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPreviewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPreviewRequest message. + * @function verify + * @memberof google.cloud.config.v1.GetPreviewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPreviewRequest.verify = function verify(message) { + if (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 GetPreviewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GetPreviewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GetPreviewRequest} GetPreviewRequest + */ + GetPreviewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GetPreviewRequest) + return object; + var message = new $root.google.cloud.config.v1.GetPreviewRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPreviewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GetPreviewRequest + * @static + * @param {google.cloud.config.v1.GetPreviewRequest} message GetPreviewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPreviewRequest.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 GetPreviewRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GetPreviewRequest + * @instance + * @returns {Object.} JSON object + */ + GetPreviewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPreviewRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.GetPreviewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPreviewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GetPreviewRequest"; + }; + + return GetPreviewRequest; + })(); + + v1.ListPreviewsRequest = (function() { + + /** + * Properties of a ListPreviewsRequest. + * @memberof google.cloud.config.v1 + * @interface IListPreviewsRequest + * @property {string|null} [parent] ListPreviewsRequest parent + * @property {number|null} [pageSize] ListPreviewsRequest pageSize + * @property {string|null} [pageToken] ListPreviewsRequest pageToken + * @property {string|null} [filter] ListPreviewsRequest filter + * @property {string|null} [orderBy] ListPreviewsRequest orderBy + */ + + /** + * Constructs a new ListPreviewsRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListPreviewsRequest. + * @implements IListPreviewsRequest + * @constructor + * @param {google.cloud.config.v1.IListPreviewsRequest=} [properties] Properties to set + */ + function ListPreviewsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPreviewsRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @instance + */ + ListPreviewsRequest.prototype.parent = ""; + + /** + * ListPreviewsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @instance + */ + ListPreviewsRequest.prototype.pageSize = 0; + + /** + * ListPreviewsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @instance + */ + ListPreviewsRequest.prototype.pageToken = ""; + + /** + * ListPreviewsRequest filter. + * @member {string} filter + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @instance + */ + ListPreviewsRequest.prototype.filter = ""; + + /** + * ListPreviewsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @instance + */ + ListPreviewsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListPreviewsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @static + * @param {google.cloud.config.v1.IListPreviewsRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListPreviewsRequest} ListPreviewsRequest instance + */ + ListPreviewsRequest.create = function create(properties) { + return new ListPreviewsRequest(properties); + }; + + /** + * Encodes the specified ListPreviewsRequest message. Does not implicitly {@link google.cloud.config.v1.ListPreviewsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @static + * @param {google.cloud.config.v1.IListPreviewsRequest} message ListPreviewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPreviewsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListPreviewsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListPreviewsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @static + * @param {google.cloud.config.v1.IListPreviewsRequest} message ListPreviewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPreviewsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPreviewsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListPreviewsRequest} ListPreviewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPreviewsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListPreviewsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPreviewsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListPreviewsRequest} ListPreviewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPreviewsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPreviewsRequest message. + * @function verify + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPreviewsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListPreviewsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListPreviewsRequest} ListPreviewsRequest + */ + ListPreviewsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListPreviewsRequest) + return object; + var message = new $root.google.cloud.config.v1.ListPreviewsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListPreviewsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @static + * @param {google.cloud.config.v1.ListPreviewsRequest} message ListPreviewsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPreviewsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListPreviewsRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPreviewsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPreviewsRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListPreviewsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPreviewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListPreviewsRequest"; + }; + + return ListPreviewsRequest; + })(); + + v1.ListPreviewsResponse = (function() { + + /** + * Properties of a ListPreviewsResponse. + * @memberof google.cloud.config.v1 + * @interface IListPreviewsResponse + * @property {Array.|null} [previews] ListPreviewsResponse previews + * @property {string|null} [nextPageToken] ListPreviewsResponse nextPageToken + * @property {Array.|null} [unreachable] ListPreviewsResponse unreachable + */ + + /** + * Constructs a new ListPreviewsResponse. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListPreviewsResponse. + * @implements IListPreviewsResponse + * @constructor + * @param {google.cloud.config.v1.IListPreviewsResponse=} [properties] Properties to set + */ + function ListPreviewsResponse(properties) { + this.previews = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPreviewsResponse previews. + * @member {Array.} previews + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @instance + */ + ListPreviewsResponse.prototype.previews = $util.emptyArray; + + /** + * ListPreviewsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @instance + */ + ListPreviewsResponse.prototype.nextPageToken = ""; + + /** + * ListPreviewsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @instance + */ + ListPreviewsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListPreviewsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @static + * @param {google.cloud.config.v1.IListPreviewsResponse=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListPreviewsResponse} ListPreviewsResponse instance + */ + ListPreviewsResponse.create = function create(properties) { + return new ListPreviewsResponse(properties); + }; + + /** + * Encodes the specified ListPreviewsResponse message. Does not implicitly {@link google.cloud.config.v1.ListPreviewsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @static + * @param {google.cloud.config.v1.IListPreviewsResponse} message ListPreviewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPreviewsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.previews != null && message.previews.length) + for (var i = 0; i < message.previews.length; ++i) + $root.google.cloud.config.v1.Preview.encode(message.previews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListPreviewsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListPreviewsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @static + * @param {google.cloud.config.v1.IListPreviewsResponse} message ListPreviewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPreviewsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPreviewsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListPreviewsResponse} ListPreviewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPreviewsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListPreviewsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.previews && message.previews.length)) + message.previews = []; + message.previews.push($root.google.cloud.config.v1.Preview.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPreviewsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListPreviewsResponse} ListPreviewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPreviewsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPreviewsResponse message. + * @function verify + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPreviewsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.previews != null && message.hasOwnProperty("previews")) { + if (!Array.isArray(message.previews)) + return "previews: array expected"; + for (var i = 0; i < message.previews.length; ++i) { + var error = $root.google.cloud.config.v1.Preview.verify(message.previews[i]); + if (error) + return "previews." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListPreviewsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListPreviewsResponse} ListPreviewsResponse + */ + ListPreviewsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListPreviewsResponse) + return object; + var message = new $root.google.cloud.config.v1.ListPreviewsResponse(); + if (object.previews) { + if (!Array.isArray(object.previews)) + throw TypeError(".google.cloud.config.v1.ListPreviewsResponse.previews: array expected"); + message.previews = []; + for (var i = 0; i < object.previews.length; ++i) { + if (typeof object.previews[i] !== "object") + throw TypeError(".google.cloud.config.v1.ListPreviewsResponse.previews: object expected"); + message.previews[i] = $root.google.cloud.config.v1.Preview.fromObject(object.previews[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.config.v1.ListPreviewsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListPreviewsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @static + * @param {google.cloud.config.v1.ListPreviewsResponse} message ListPreviewsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPreviewsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.previews = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.previews && message.previews.length) { + object.previews = []; + for (var j = 0; j < message.previews.length; ++j) + object.previews[j] = $root.google.cloud.config.v1.Preview.toObject(message.previews[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListPreviewsResponse to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPreviewsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPreviewsResponse + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListPreviewsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPreviewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListPreviewsResponse"; + }; + + return ListPreviewsResponse; + })(); + + v1.DeletePreviewRequest = (function() { + + /** + * Properties of a DeletePreviewRequest. + * @memberof google.cloud.config.v1 + * @interface IDeletePreviewRequest + * @property {string|null} [name] DeletePreviewRequest name + * @property {string|null} [requestId] DeletePreviewRequest requestId + */ + + /** + * Constructs a new DeletePreviewRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a DeletePreviewRequest. + * @implements IDeletePreviewRequest + * @constructor + * @param {google.cloud.config.v1.IDeletePreviewRequest=} [properties] Properties to set + */ + function DeletePreviewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePreviewRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @instance + */ + DeletePreviewRequest.prototype.name = ""; + + /** + * DeletePreviewRequest requestId. + * @member {string} requestId + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @instance + */ + DeletePreviewRequest.prototype.requestId = ""; + + /** + * Creates a new DeletePreviewRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @static + * @param {google.cloud.config.v1.IDeletePreviewRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.DeletePreviewRequest} DeletePreviewRequest instance + */ + DeletePreviewRequest.create = function create(properties) { + return new DeletePreviewRequest(properties); + }; + + /** + * Encodes the specified DeletePreviewRequest message. Does not implicitly {@link google.cloud.config.v1.DeletePreviewRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @static + * @param {google.cloud.config.v1.IDeletePreviewRequest} message DeletePreviewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePreviewRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeletePreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeletePreviewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @static + * @param {google.cloud.config.v1.IDeletePreviewRequest} message DeletePreviewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePreviewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePreviewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.DeletePreviewRequest} DeletePreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePreviewRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.DeletePreviewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeletePreviewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.DeletePreviewRequest} DeletePreviewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePreviewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePreviewRequest message. + * @function verify + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePreviewRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeletePreviewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.DeletePreviewRequest} DeletePreviewRequest + */ + DeletePreviewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.DeletePreviewRequest) + return object; + var message = new $root.google.cloud.config.v1.DeletePreviewRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeletePreviewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @static + * @param {google.cloud.config.v1.DeletePreviewRequest} message DeletePreviewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePreviewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeletePreviewRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePreviewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeletePreviewRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.DeletePreviewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePreviewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.DeletePreviewRequest"; + }; + + return DeletePreviewRequest; + })(); + + v1.ExportPreviewResultRequest = (function() { + + /** + * Properties of an ExportPreviewResultRequest. + * @memberof google.cloud.config.v1 + * @interface IExportPreviewResultRequest + * @property {string|null} [parent] ExportPreviewResultRequest parent + */ + + /** + * Constructs a new ExportPreviewResultRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents an ExportPreviewResultRequest. + * @implements IExportPreviewResultRequest + * @constructor + * @param {google.cloud.config.v1.IExportPreviewResultRequest=} [properties] Properties to set + */ + function ExportPreviewResultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportPreviewResultRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ExportPreviewResultRequest + * @instance + */ + ExportPreviewResultRequest.prototype.parent = ""; + + /** + * Creates a new ExportPreviewResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ExportPreviewResultRequest + * @static + * @param {google.cloud.config.v1.IExportPreviewResultRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ExportPreviewResultRequest} ExportPreviewResultRequest instance + */ + ExportPreviewResultRequest.create = function create(properties) { + return new ExportPreviewResultRequest(properties); + }; + + /** + * Encodes the specified ExportPreviewResultRequest message. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ExportPreviewResultRequest + * @static + * @param {google.cloud.config.v1.IExportPreviewResultRequest} message ExportPreviewResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportPreviewResultRequest.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); + return writer; + }; + + /** + * Encodes the specified ExportPreviewResultRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ExportPreviewResultRequest + * @static + * @param {google.cloud.config.v1.IExportPreviewResultRequest} message ExportPreviewResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportPreviewResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportPreviewResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ExportPreviewResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ExportPreviewResultRequest} ExportPreviewResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportPreviewResultRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ExportPreviewResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportPreviewResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ExportPreviewResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ExportPreviewResultRequest} ExportPreviewResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportPreviewResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportPreviewResultRequest message. + * @function verify + * @memberof google.cloud.config.v1.ExportPreviewResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportPreviewResultRequest.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"; + return null; + }; + + /** + * Creates an ExportPreviewResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ExportPreviewResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ExportPreviewResultRequest} ExportPreviewResultRequest + */ + ExportPreviewResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ExportPreviewResultRequest) + return object; + var message = new $root.google.cloud.config.v1.ExportPreviewResultRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from an ExportPreviewResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ExportPreviewResultRequest + * @static + * @param {google.cloud.config.v1.ExportPreviewResultRequest} message ExportPreviewResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportPreviewResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ExportPreviewResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ExportPreviewResultRequest + * @instance + * @returns {Object.} JSON object + */ + ExportPreviewResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportPreviewResultRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ExportPreviewResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportPreviewResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ExportPreviewResultRequest"; + }; + + return ExportPreviewResultRequest; + })(); + + v1.ExportPreviewResultResponse = (function() { + + /** + * Properties of an ExportPreviewResultResponse. + * @memberof google.cloud.config.v1 + * @interface IExportPreviewResultResponse + * @property {google.cloud.config.v1.IPreviewResult|null} [result] ExportPreviewResultResponse result + */ + + /** + * Constructs a new ExportPreviewResultResponse. + * @memberof google.cloud.config.v1 + * @classdesc Represents an ExportPreviewResultResponse. + * @implements IExportPreviewResultResponse + * @constructor + * @param {google.cloud.config.v1.IExportPreviewResultResponse=} [properties] Properties to set + */ + function ExportPreviewResultResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportPreviewResultResponse result. + * @member {google.cloud.config.v1.IPreviewResult|null|undefined} result + * @memberof google.cloud.config.v1.ExportPreviewResultResponse + * @instance + */ + ExportPreviewResultResponse.prototype.result = null; + + /** + * Creates a new ExportPreviewResultResponse instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ExportPreviewResultResponse + * @static + * @param {google.cloud.config.v1.IExportPreviewResultResponse=} [properties] Properties to set + * @returns {google.cloud.config.v1.ExportPreviewResultResponse} ExportPreviewResultResponse instance + */ + ExportPreviewResultResponse.create = function create(properties) { + return new ExportPreviewResultResponse(properties); + }; + + /** + * Encodes the specified ExportPreviewResultResponse message. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ExportPreviewResultResponse + * @static + * @param {google.cloud.config.v1.IExportPreviewResultResponse} message ExportPreviewResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportPreviewResultResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.config.v1.PreviewResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportPreviewResultResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ExportPreviewResultResponse + * @static + * @param {google.cloud.config.v1.IExportPreviewResultResponse} message ExportPreviewResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportPreviewResultResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportPreviewResultResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ExportPreviewResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ExportPreviewResultResponse} ExportPreviewResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportPreviewResultResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ExportPreviewResultResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.result = $root.google.cloud.config.v1.PreviewResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportPreviewResultResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ExportPreviewResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ExportPreviewResultResponse} ExportPreviewResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportPreviewResultResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportPreviewResultResponse message. + * @function verify + * @memberof google.cloud.config.v1.ExportPreviewResultResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportPreviewResultResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.cloud.config.v1.PreviewResult.verify(message.result); + if (error) + return "result." + error; + } + return null; + }; + + /** + * Creates an ExportPreviewResultResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ExportPreviewResultResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ExportPreviewResultResponse} ExportPreviewResultResponse + */ + ExportPreviewResultResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ExportPreviewResultResponse) + return object; + var message = new $root.google.cloud.config.v1.ExportPreviewResultResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.config.v1.ExportPreviewResultResponse.result: object expected"); + message.result = $root.google.cloud.config.v1.PreviewResult.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from an ExportPreviewResultResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ExportPreviewResultResponse + * @static + * @param {google.cloud.config.v1.ExportPreviewResultResponse} message ExportPreviewResultResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportPreviewResultResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.cloud.config.v1.PreviewResult.toObject(message.result, options); + return object; + }; + + /** + * Converts this ExportPreviewResultResponse to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ExportPreviewResultResponse + * @instance + * @returns {Object.} JSON object + */ + ExportPreviewResultResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportPreviewResultResponse + * @function getTypeUrl + * @memberof google.cloud.config.v1.ExportPreviewResultResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportPreviewResultResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ExportPreviewResultResponse"; + }; + + return ExportPreviewResultResponse; + })(); + + v1.PreviewResult = (function() { + + /** + * Properties of a PreviewResult. + * @memberof google.cloud.config.v1 + * @interface IPreviewResult + * @property {string|null} [binarySignedUri] PreviewResult binarySignedUri + * @property {string|null} [jsonSignedUri] PreviewResult jsonSignedUri + */ + + /** + * Constructs a new PreviewResult. + * @memberof google.cloud.config.v1 + * @classdesc Represents a PreviewResult. + * @implements IPreviewResult + * @constructor + * @param {google.cloud.config.v1.IPreviewResult=} [properties] Properties to set + */ + function PreviewResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PreviewResult binarySignedUri. + * @member {string} binarySignedUri + * @memberof google.cloud.config.v1.PreviewResult + * @instance + */ + PreviewResult.prototype.binarySignedUri = ""; + + /** + * PreviewResult jsonSignedUri. + * @member {string} jsonSignedUri + * @memberof google.cloud.config.v1.PreviewResult + * @instance + */ + PreviewResult.prototype.jsonSignedUri = ""; + + /** + * Creates a new PreviewResult instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.PreviewResult + * @static + * @param {google.cloud.config.v1.IPreviewResult=} [properties] Properties to set + * @returns {google.cloud.config.v1.PreviewResult} PreviewResult instance + */ + PreviewResult.create = function create(properties) { + return new PreviewResult(properties); + }; + + /** + * Encodes the specified PreviewResult message. Does not implicitly {@link google.cloud.config.v1.PreviewResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.PreviewResult + * @static + * @param {google.cloud.config.v1.IPreviewResult} message PreviewResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviewResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.binarySignedUri != null && Object.hasOwnProperty.call(message, "binarySignedUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.binarySignedUri); + if (message.jsonSignedUri != null && Object.hasOwnProperty.call(message, "jsonSignedUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jsonSignedUri); + return writer; + }; + + /** + * Encodes the specified PreviewResult message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.PreviewResult + * @static + * @param {google.cloud.config.v1.IPreviewResult} message PreviewResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviewResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreviewResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.PreviewResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.PreviewResult} PreviewResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviewResult.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PreviewResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.binarySignedUri = reader.string(); + break; + } + case 2: { + message.jsonSignedUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PreviewResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.PreviewResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.PreviewResult} PreviewResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviewResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreviewResult message. + * @function verify + * @memberof google.cloud.config.v1.PreviewResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreviewResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.binarySignedUri != null && message.hasOwnProperty("binarySignedUri")) + if (!$util.isString(message.binarySignedUri)) + return "binarySignedUri: string expected"; + if (message.jsonSignedUri != null && message.hasOwnProperty("jsonSignedUri")) + if (!$util.isString(message.jsonSignedUri)) + return "jsonSignedUri: string expected"; + return null; + }; + + /** + * Creates a PreviewResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.PreviewResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.PreviewResult} PreviewResult + */ + PreviewResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.PreviewResult) + return object; + var message = new $root.google.cloud.config.v1.PreviewResult(); + if (object.binarySignedUri != null) + message.binarySignedUri = String(object.binarySignedUri); + if (object.jsonSignedUri != null) + message.jsonSignedUri = String(object.jsonSignedUri); + return message; + }; + + /** + * Creates a plain object from a PreviewResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.PreviewResult + * @static + * @param {google.cloud.config.v1.PreviewResult} message PreviewResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreviewResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.binarySignedUri = ""; + object.jsonSignedUri = ""; + } + if (message.binarySignedUri != null && message.hasOwnProperty("binarySignedUri")) + object.binarySignedUri = message.binarySignedUri; + if (message.jsonSignedUri != null && message.hasOwnProperty("jsonSignedUri")) + object.jsonSignedUri = message.jsonSignedUri; + return object; + }; + + /** + * Converts this PreviewResult to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.PreviewResult + * @instance + * @returns {Object.} JSON object + */ + PreviewResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PreviewResult + * @function getTypeUrl + * @memberof google.cloud.config.v1.PreviewResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreviewResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.PreviewResult"; + }; + + return PreviewResult; + })(); + + v1.GetTerraformVersionRequest = (function() { + + /** + * Properties of a GetTerraformVersionRequest. + * @memberof google.cloud.config.v1 + * @interface IGetTerraformVersionRequest + * @property {string|null} [name] GetTerraformVersionRequest name + */ + + /** + * Constructs a new GetTerraformVersionRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GetTerraformVersionRequest. + * @implements IGetTerraformVersionRequest + * @constructor + * @param {google.cloud.config.v1.IGetTerraformVersionRequest=} [properties] Properties to set + */ + function GetTerraformVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTerraformVersionRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.GetTerraformVersionRequest + * @instance + */ + GetTerraformVersionRequest.prototype.name = ""; + + /** + * Creates a new GetTerraformVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GetTerraformVersionRequest + * @static + * @param {google.cloud.config.v1.IGetTerraformVersionRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.GetTerraformVersionRequest} GetTerraformVersionRequest instance + */ + GetTerraformVersionRequest.create = function create(properties) { + return new GetTerraformVersionRequest(properties); + }; + + /** + * Encodes the specified GetTerraformVersionRequest message. Does not implicitly {@link google.cloud.config.v1.GetTerraformVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GetTerraformVersionRequest + * @static + * @param {google.cloud.config.v1.IGetTerraformVersionRequest} message GetTerraformVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTerraformVersionRequest.encode = function encode(message, writer) { + 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 GetTerraformVersionRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetTerraformVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GetTerraformVersionRequest + * @static + * @param {google.cloud.config.v1.IGetTerraformVersionRequest} message GetTerraformVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTerraformVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTerraformVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GetTerraformVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GetTerraformVersionRequest} GetTerraformVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTerraformVersionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetTerraformVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTerraformVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GetTerraformVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GetTerraformVersionRequest} GetTerraformVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTerraformVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTerraformVersionRequest message. + * @function verify + * @memberof google.cloud.config.v1.GetTerraformVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTerraformVersionRequest.verify = function verify(message) { + if (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 GetTerraformVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GetTerraformVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GetTerraformVersionRequest} GetTerraformVersionRequest + */ + GetTerraformVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GetTerraformVersionRequest) + return object; + var message = new $root.google.cloud.config.v1.GetTerraformVersionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTerraformVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GetTerraformVersionRequest + * @static + * @param {google.cloud.config.v1.GetTerraformVersionRequest} message GetTerraformVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTerraformVersionRequest.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 GetTerraformVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GetTerraformVersionRequest + * @instance + * @returns {Object.} JSON object + */ + GetTerraformVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetTerraformVersionRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.GetTerraformVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTerraformVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GetTerraformVersionRequest"; + }; + + return GetTerraformVersionRequest; + })(); + + v1.ListTerraformVersionsRequest = (function() { + + /** + * Properties of a ListTerraformVersionsRequest. + * @memberof google.cloud.config.v1 + * @interface IListTerraformVersionsRequest + * @property {string|null} [parent] ListTerraformVersionsRequest parent + * @property {number|null} [pageSize] ListTerraformVersionsRequest pageSize + * @property {string|null} [pageToken] ListTerraformVersionsRequest pageToken + * @property {string|null} [filter] ListTerraformVersionsRequest filter + * @property {string|null} [orderBy] ListTerraformVersionsRequest orderBy + */ + + /** + * Constructs a new ListTerraformVersionsRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListTerraformVersionsRequest. + * @implements IListTerraformVersionsRequest + * @constructor + * @param {google.cloud.config.v1.IListTerraformVersionsRequest=} [properties] Properties to set + */ + function ListTerraformVersionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTerraformVersionsRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @instance + */ + ListTerraformVersionsRequest.prototype.parent = ""; + + /** + * ListTerraformVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @instance + */ + ListTerraformVersionsRequest.prototype.pageSize = 0; + + /** + * ListTerraformVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @instance + */ + ListTerraformVersionsRequest.prototype.pageToken = ""; + + /** + * ListTerraformVersionsRequest filter. + * @member {string} filter + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @instance + */ + ListTerraformVersionsRequest.prototype.filter = ""; + + /** + * ListTerraformVersionsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @instance + */ + ListTerraformVersionsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListTerraformVersionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @static + * @param {google.cloud.config.v1.IListTerraformVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListTerraformVersionsRequest} ListTerraformVersionsRequest instance + */ + ListTerraformVersionsRequest.create = function create(properties) { + return new ListTerraformVersionsRequest(properties); + }; + + /** + * Encodes the specified ListTerraformVersionsRequest message. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @static + * @param {google.cloud.config.v1.IListTerraformVersionsRequest} message ListTerraformVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTerraformVersionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListTerraformVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @static + * @param {google.cloud.config.v1.IListTerraformVersionsRequest} message ListTerraformVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTerraformVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTerraformVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListTerraformVersionsRequest} ListTerraformVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTerraformVersionsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListTerraformVersionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTerraformVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListTerraformVersionsRequest} ListTerraformVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTerraformVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTerraformVersionsRequest message. + * @function verify + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTerraformVersionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListTerraformVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListTerraformVersionsRequest} ListTerraformVersionsRequest + */ + ListTerraformVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListTerraformVersionsRequest) + return object; + var message = new $root.google.cloud.config.v1.ListTerraformVersionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListTerraformVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @static + * @param {google.cloud.config.v1.ListTerraformVersionsRequest} message ListTerraformVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTerraformVersionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListTerraformVersionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTerraformVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTerraformVersionsRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListTerraformVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTerraformVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListTerraformVersionsRequest"; + }; + + return ListTerraformVersionsRequest; + })(); + + v1.ListTerraformVersionsResponse = (function() { + + /** + * Properties of a ListTerraformVersionsResponse. + * @memberof google.cloud.config.v1 + * @interface IListTerraformVersionsResponse + * @property {Array.|null} [terraformVersions] ListTerraformVersionsResponse terraformVersions + * @property {string|null} [nextPageToken] ListTerraformVersionsResponse nextPageToken + * @property {Array.|null} [unreachable] ListTerraformVersionsResponse unreachable + */ + + /** + * Constructs a new ListTerraformVersionsResponse. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListTerraformVersionsResponse. + * @implements IListTerraformVersionsResponse + * @constructor + * @param {google.cloud.config.v1.IListTerraformVersionsResponse=} [properties] Properties to set + */ + function ListTerraformVersionsResponse(properties) { + this.terraformVersions = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTerraformVersionsResponse terraformVersions. + * @member {Array.} terraformVersions + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @instance + */ + ListTerraformVersionsResponse.prototype.terraformVersions = $util.emptyArray; + + /** + * ListTerraformVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @instance + */ + ListTerraformVersionsResponse.prototype.nextPageToken = ""; + + /** + * ListTerraformVersionsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @instance + */ + ListTerraformVersionsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListTerraformVersionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @static + * @param {google.cloud.config.v1.IListTerraformVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListTerraformVersionsResponse} ListTerraformVersionsResponse instance + */ + ListTerraformVersionsResponse.create = function create(properties) { + return new ListTerraformVersionsResponse(properties); + }; + + /** + * Encodes the specified ListTerraformVersionsResponse message. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @static + * @param {google.cloud.config.v1.IListTerraformVersionsResponse} message ListTerraformVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTerraformVersionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.terraformVersions != null && message.terraformVersions.length) + for (var i = 0; i < message.terraformVersions.length; ++i) + $root.google.cloud.config.v1.TerraformVersion.encode(message.terraformVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListTerraformVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @static + * @param {google.cloud.config.v1.IListTerraformVersionsResponse} message ListTerraformVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTerraformVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTerraformVersionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListTerraformVersionsResponse} ListTerraformVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTerraformVersionsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListTerraformVersionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.terraformVersions && message.terraformVersions.length)) + message.terraformVersions = []; + message.terraformVersions.push($root.google.cloud.config.v1.TerraformVersion.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTerraformVersionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListTerraformVersionsResponse} ListTerraformVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTerraformVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTerraformVersionsResponse message. + * @function verify + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTerraformVersionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.terraformVersions != null && message.hasOwnProperty("terraformVersions")) { + if (!Array.isArray(message.terraformVersions)) + return "terraformVersions: array expected"; + for (var i = 0; i < message.terraformVersions.length; ++i) { + var error = $root.google.cloud.config.v1.TerraformVersion.verify(message.terraformVersions[i]); + if (error) + return "terraformVersions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListTerraformVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListTerraformVersionsResponse} ListTerraformVersionsResponse + */ + ListTerraformVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListTerraformVersionsResponse) + return object; + var message = new $root.google.cloud.config.v1.ListTerraformVersionsResponse(); + if (object.terraformVersions) { + if (!Array.isArray(object.terraformVersions)) + throw TypeError(".google.cloud.config.v1.ListTerraformVersionsResponse.terraformVersions: array expected"); + message.terraformVersions = []; + for (var i = 0; i < object.terraformVersions.length; ++i) { + if (typeof object.terraformVersions[i] !== "object") + throw TypeError(".google.cloud.config.v1.ListTerraformVersionsResponse.terraformVersions: object expected"); + message.terraformVersions[i] = $root.google.cloud.config.v1.TerraformVersion.fromObject(object.terraformVersions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.config.v1.ListTerraformVersionsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListTerraformVersionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @static + * @param {google.cloud.config.v1.ListTerraformVersionsResponse} message ListTerraformVersionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTerraformVersionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.terraformVersions = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.terraformVersions && message.terraformVersions.length) { + object.terraformVersions = []; + for (var j = 0; j < message.terraformVersions.length; ++j) + object.terraformVersions[j] = $root.google.cloud.config.v1.TerraformVersion.toObject(message.terraformVersions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListTerraformVersionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListTerraformVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTerraformVersionsResponse + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListTerraformVersionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTerraformVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListTerraformVersionsResponse"; + }; + + return ListTerraformVersionsResponse; + })(); + + v1.TerraformVersion = (function() { + + /** + * Properties of a TerraformVersion. + * @memberof google.cloud.config.v1 + * @interface ITerraformVersion + * @property {string|null} [name] TerraformVersion name + * @property {google.cloud.config.v1.TerraformVersion.State|null} [state] TerraformVersion state + * @property {google.protobuf.ITimestamp|null} [supportTime] TerraformVersion supportTime + * @property {google.protobuf.ITimestamp|null} [deprecateTime] TerraformVersion deprecateTime + * @property {google.protobuf.ITimestamp|null} [obsoleteTime] TerraformVersion obsoleteTime + */ + + /** + * Constructs a new TerraformVersion. + * @memberof google.cloud.config.v1 + * @classdesc Represents a TerraformVersion. + * @implements ITerraformVersion + * @constructor + * @param {google.cloud.config.v1.ITerraformVersion=} [properties] Properties to set + */ + function TerraformVersion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TerraformVersion name. + * @member {string} name + * @memberof google.cloud.config.v1.TerraformVersion + * @instance + */ + TerraformVersion.prototype.name = ""; + + /** + * TerraformVersion state. + * @member {google.cloud.config.v1.TerraformVersion.State} state + * @memberof google.cloud.config.v1.TerraformVersion + * @instance + */ + TerraformVersion.prototype.state = 0; + + /** + * TerraformVersion supportTime. + * @member {google.protobuf.ITimestamp|null|undefined} supportTime + * @memberof google.cloud.config.v1.TerraformVersion + * @instance + */ + TerraformVersion.prototype.supportTime = null; + + /** + * TerraformVersion deprecateTime. + * @member {google.protobuf.ITimestamp|null|undefined} deprecateTime + * @memberof google.cloud.config.v1.TerraformVersion + * @instance + */ + TerraformVersion.prototype.deprecateTime = null; + + /** + * TerraformVersion obsoleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} obsoleteTime + * @memberof google.cloud.config.v1.TerraformVersion + * @instance + */ + TerraformVersion.prototype.obsoleteTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TerraformVersion.prototype, "_deprecateTime", { + get: $util.oneOfGetter($oneOfFields = ["deprecateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TerraformVersion.prototype, "_obsoleteTime", { + get: $util.oneOfGetter($oneOfFields = ["obsoleteTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TerraformVersion instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.TerraformVersion + * @static + * @param {google.cloud.config.v1.ITerraformVersion=} [properties] Properties to set + * @returns {google.cloud.config.v1.TerraformVersion} TerraformVersion instance + */ + TerraformVersion.create = function create(properties) { + return new TerraformVersion(properties); + }; + + /** + * Encodes the specified TerraformVersion message. Does not implicitly {@link google.cloud.config.v1.TerraformVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.TerraformVersion + * @static + * @param {google.cloud.config.v1.ITerraformVersion} message TerraformVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerraformVersion.encode = function encode(message, writer) { + 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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.supportTime != null && Object.hasOwnProperty.call(message, "supportTime")) + $root.google.protobuf.Timestamp.encode(message.supportTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.deprecateTime != null && Object.hasOwnProperty.call(message, "deprecateTime")) + $root.google.protobuf.Timestamp.encode(message.deprecateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.obsoleteTime != null && Object.hasOwnProperty.call(message, "obsoleteTime")) + $root.google.protobuf.Timestamp.encode(message.obsoleteTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TerraformVersion message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.TerraformVersion + * @static + * @param {google.cloud.config.v1.ITerraformVersion} message TerraformVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TerraformVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TerraformVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.TerraformVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.TerraformVersion} TerraformVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerraformVersion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.TerraformVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.supportTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.deprecateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.obsoleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TerraformVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.TerraformVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.TerraformVersion} TerraformVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TerraformVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TerraformVersion message. + * @function verify + * @memberof google.cloud.config.v1.TerraformVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TerraformVersion.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.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.supportTime != null && message.hasOwnProperty("supportTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.supportTime); + if (error) + return "supportTime." + error; + } + if (message.deprecateTime != null && message.hasOwnProperty("deprecateTime")) { + properties._deprecateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.deprecateTime); + if (error) + return "deprecateTime." + error; + } + } + if (message.obsoleteTime != null && message.hasOwnProperty("obsoleteTime")) { + properties._obsoleteTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.obsoleteTime); + if (error) + return "obsoleteTime." + error; + } + } + return null; + }; + + /** + * Creates a TerraformVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.TerraformVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.TerraformVersion} TerraformVersion + */ + TerraformVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.TerraformVersion) + return object; + var message = new $root.google.cloud.config.v1.TerraformVersion(); + if (object.name != null) + message.name = String(object.name); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "DEPRECATED": + case 2: + message.state = 2; + break; + case "OBSOLETE": + case 3: + message.state = 3; + break; + } + if (object.supportTime != null) { + if (typeof object.supportTime !== "object") + throw TypeError(".google.cloud.config.v1.TerraformVersion.supportTime: object expected"); + message.supportTime = $root.google.protobuf.Timestamp.fromObject(object.supportTime); + } + if (object.deprecateTime != null) { + if (typeof object.deprecateTime !== "object") + throw TypeError(".google.cloud.config.v1.TerraformVersion.deprecateTime: object expected"); + message.deprecateTime = $root.google.protobuf.Timestamp.fromObject(object.deprecateTime); + } + if (object.obsoleteTime != null) { + if (typeof object.obsoleteTime !== "object") + throw TypeError(".google.cloud.config.v1.TerraformVersion.obsoleteTime: object expected"); + message.obsoleteTime = $root.google.protobuf.Timestamp.fromObject(object.obsoleteTime); + } + return message; + }; + + /** + * Creates a plain object from a TerraformVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.TerraformVersion + * @static + * @param {google.cloud.config.v1.TerraformVersion} message TerraformVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TerraformVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.supportTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.config.v1.TerraformVersion.State[message.state] === undefined ? message.state : $root.google.cloud.config.v1.TerraformVersion.State[message.state] : message.state; + if (message.supportTime != null && message.hasOwnProperty("supportTime")) + object.supportTime = $root.google.protobuf.Timestamp.toObject(message.supportTime, options); + if (message.deprecateTime != null && message.hasOwnProperty("deprecateTime")) { + object.deprecateTime = $root.google.protobuf.Timestamp.toObject(message.deprecateTime, options); + if (options.oneofs) + object._deprecateTime = "deprecateTime"; + } + if (message.obsoleteTime != null && message.hasOwnProperty("obsoleteTime")) { + object.obsoleteTime = $root.google.protobuf.Timestamp.toObject(message.obsoleteTime, options); + if (options.oneofs) + object._obsoleteTime = "obsoleteTime"; + } + return object; + }; + + /** + * Converts this TerraformVersion to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.TerraformVersion + * @instance + * @returns {Object.} JSON object + */ + TerraformVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TerraformVersion + * @function getTypeUrl + * @memberof google.cloud.config.v1.TerraformVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TerraformVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.TerraformVersion"; + }; + + /** + * State enum. + * @name google.cloud.config.v1.TerraformVersion.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} DEPRECATED=2 DEPRECATED value + * @property {number} OBSOLETE=3 OBSOLETE value + */ + TerraformVersion.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "DEPRECATED"] = 2; + values[valuesById[3] = "OBSOLETE"] = 3; + return values; + })(); + + return TerraformVersion; + })(); + + v1.ResourceChangeTerraformInfo = (function() { + + /** + * Properties of a ResourceChangeTerraformInfo. + * @memberof google.cloud.config.v1 + * @interface IResourceChangeTerraformInfo + * @property {string|null} [address] ResourceChangeTerraformInfo address + * @property {string|null} [type] ResourceChangeTerraformInfo type + * @property {string|null} [resourceName] ResourceChangeTerraformInfo resourceName + * @property {string|null} [provider] ResourceChangeTerraformInfo provider + * @property {Array.|null} [actions] ResourceChangeTerraformInfo actions + */ + + /** + * Constructs a new ResourceChangeTerraformInfo. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ResourceChangeTerraformInfo. + * @implements IResourceChangeTerraformInfo + * @constructor + * @param {google.cloud.config.v1.IResourceChangeTerraformInfo=} [properties] Properties to set + */ + function ResourceChangeTerraformInfo(properties) { + this.actions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceChangeTerraformInfo address. + * @member {string} address + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + */ + ResourceChangeTerraformInfo.prototype.address = ""; + + /** + * ResourceChangeTerraformInfo type. + * @member {string} type + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + */ + ResourceChangeTerraformInfo.prototype.type = ""; + + /** + * ResourceChangeTerraformInfo resourceName. + * @member {string} resourceName + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + */ + ResourceChangeTerraformInfo.prototype.resourceName = ""; + + /** + * ResourceChangeTerraformInfo provider. + * @member {string} provider + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + */ + ResourceChangeTerraformInfo.prototype.provider = ""; + + /** + * ResourceChangeTerraformInfo actions. + * @member {Array.} actions + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + */ + ResourceChangeTerraformInfo.prototype.actions = $util.emptyArray; + + /** + * Creates a new ResourceChangeTerraformInfo instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceChangeTerraformInfo=} [properties] Properties to set + * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo instance + */ + ResourceChangeTerraformInfo.create = function create(properties) { + return new ResourceChangeTerraformInfo(properties); + }; + + /** + * Encodes the specified ResourceChangeTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceChangeTerraformInfo} message ResourceChangeTerraformInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceChangeTerraformInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.provider); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.actions[i]); + return writer; + }; + + /** + * Encodes the specified ResourceChangeTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceChangeTerraformInfo} message ResourceChangeTerraformInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceChangeTerraformInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceChangeTerraformInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceChangeTerraformInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceChangeTerraformInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.address = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + message.resourceName = reader.string(); + break; + } + case 4: { + message.provider = reader.string(); + break; + } + case 5: { + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceChangeTerraformInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceChangeTerraformInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceChangeTerraformInfo message. + * @function verify + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceChangeTerraformInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.provider != null && message.hasOwnProperty("provider")) + if (!$util.isString(message.provider)) + return "provider: string expected"; + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) + if (!$util.isString(message.actions[i])) + return "actions: string[] expected"; + } + return null; + }; + + /** + * Creates a ResourceChangeTerraformInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo + */ + ResourceChangeTerraformInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ResourceChangeTerraformInfo) + return object; + var message = new $root.google.cloud.config.v1.ResourceChangeTerraformInfo(); + if (object.address != null) + message.address = String(object.address); + if (object.type != null) + message.type = String(object.type); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.provider != null) + message.provider = String(object.provider); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.cloud.config.v1.ResourceChangeTerraformInfo.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) + message.actions[i] = String(object.actions[i]); + } + return message; + }; + + /** + * Creates a plain object from a ResourceChangeTerraformInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {google.cloud.config.v1.ResourceChangeTerraformInfo} message ResourceChangeTerraformInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceChangeTerraformInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.actions = []; + if (options.defaults) { + object.address = ""; + object.type = ""; + object.resourceName = ""; + object.provider = ""; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = message.provider; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = message.actions[j]; + } + return object; + }; + + /** + * Converts this ResourceChangeTerraformInfo to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + * @returns {Object.} JSON object + */ + ResourceChangeTerraformInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceChangeTerraformInfo + * @function getTypeUrl + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceChangeTerraformInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ResourceChangeTerraformInfo"; + }; + + return ResourceChangeTerraformInfo; + })(); + + v1.ResourceChange = (function() { + + /** + * Properties of a ResourceChange. + * @memberof google.cloud.config.v1 + * @interface IResourceChange + * @property {string|null} [name] ResourceChange name + * @property {google.cloud.config.v1.IResourceChangeTerraformInfo|null} [terraformInfo] ResourceChange terraformInfo + * @property {google.cloud.config.v1.ResourceChange.Intent|null} [intent] ResourceChange intent + * @property {Array.|null} [propertyChanges] ResourceChange propertyChanges + */ + + /** + * Constructs a new ResourceChange. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ResourceChange. + * @implements IResourceChange + * @constructor + * @param {google.cloud.config.v1.IResourceChange=} [properties] Properties to set + */ + function ResourceChange(properties) { + this.propertyChanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceChange name. + * @member {string} name + * @memberof google.cloud.config.v1.ResourceChange + * @instance + */ + ResourceChange.prototype.name = ""; + + /** + * ResourceChange terraformInfo. + * @member {google.cloud.config.v1.IResourceChangeTerraformInfo|null|undefined} terraformInfo + * @memberof google.cloud.config.v1.ResourceChange + * @instance + */ + ResourceChange.prototype.terraformInfo = null; + + /** + * ResourceChange intent. + * @member {google.cloud.config.v1.ResourceChange.Intent} intent + * @memberof google.cloud.config.v1.ResourceChange + * @instance + */ + ResourceChange.prototype.intent = 0; + + /** + * ResourceChange propertyChanges. + * @member {Array.} propertyChanges + * @memberof google.cloud.config.v1.ResourceChange + * @instance + */ + ResourceChange.prototype.propertyChanges = $util.emptyArray; + + /** + * Creates a new ResourceChange instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {google.cloud.config.v1.IResourceChange=} [properties] Properties to set + * @returns {google.cloud.config.v1.ResourceChange} ResourceChange instance + */ + ResourceChange.create = function create(properties) { + return new ResourceChange(properties); + }; + + /** + * Encodes the specified ResourceChange message. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {google.cloud.config.v1.IResourceChange} message ResourceChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceChange.encode = function encode(message, writer) { + 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.terraformInfo != null && Object.hasOwnProperty.call(message, "terraformInfo")) + $root.google.cloud.config.v1.ResourceChangeTerraformInfo.encode(message.terraformInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.intent); + if (message.propertyChanges != null && message.propertyChanges.length) + for (var i = 0; i < message.propertyChanges.length; ++i) + $root.google.cloud.config.v1.PropertyChange.encode(message.propertyChanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {google.cloud.config.v1.IResourceChange} message ResourceChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceChange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ResourceChange} ResourceChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceChange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.terraformInfo = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + message.intent = reader.int32(); + break; + } + case 4: { + if (!(message.propertyChanges && message.propertyChanges.length)) + message.propertyChanges = []; + message.propertyChanges.push($root.google.cloud.config.v1.PropertyChange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ResourceChange} ResourceChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceChange message. + * @function verify + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceChange.verify = function verify(message) { + if (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.terraformInfo != null && message.hasOwnProperty("terraformInfo")) { + var error = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.verify(message.terraformInfo); + if (error) + return "terraformInfo." + error; + } + if (message.intent != null && message.hasOwnProperty("intent")) + switch (message.intent) { + default: + return "intent: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.propertyChanges != null && message.hasOwnProperty("propertyChanges")) { + if (!Array.isArray(message.propertyChanges)) + return "propertyChanges: array expected"; + for (var i = 0; i < message.propertyChanges.length; ++i) { + var error = $root.google.cloud.config.v1.PropertyChange.verify(message.propertyChanges[i]); + if (error) + return "propertyChanges." + error; + } + } + return null; + }; + + /** + * Creates a ResourceChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ResourceChange} ResourceChange + */ + ResourceChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ResourceChange) + return object; + var message = new $root.google.cloud.config.v1.ResourceChange(); + if (object.name != null) + message.name = String(object.name); + if (object.terraformInfo != null) { + if (typeof object.terraformInfo !== "object") + throw TypeError(".google.cloud.config.v1.ResourceChange.terraformInfo: object expected"); + message.terraformInfo = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.fromObject(object.terraformInfo); + } + switch (object.intent) { + default: + if (typeof object.intent === "number") { + message.intent = object.intent; + break; + } + break; + case "INTENT_UNSPECIFIED": + case 0: + message.intent = 0; + break; + case "CREATE": + case 1: + message.intent = 1; + break; + case "UPDATE": + case 2: + message.intent = 2; + break; + case "DELETE": + case 3: + message.intent = 3; + break; + case "RECREATE": + case 4: + message.intent = 4; + break; + case "UNCHANGED": + case 5: + message.intent = 5; + break; + } + if (object.propertyChanges) { + if (!Array.isArray(object.propertyChanges)) + throw TypeError(".google.cloud.config.v1.ResourceChange.propertyChanges: array expected"); + message.propertyChanges = []; + for (var i = 0; i < object.propertyChanges.length; ++i) { + if (typeof object.propertyChanges[i] !== "object") + throw TypeError(".google.cloud.config.v1.ResourceChange.propertyChanges: object expected"); + message.propertyChanges[i] = $root.google.cloud.config.v1.PropertyChange.fromObject(object.propertyChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {google.cloud.config.v1.ResourceChange} message ResourceChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.propertyChanges = []; + if (options.defaults) { + object.name = ""; + object.terraformInfo = null; + object.intent = options.enums === String ? "INTENT_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.terraformInfo != null && message.hasOwnProperty("terraformInfo")) + object.terraformInfo = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.toObject(message.terraformInfo, options); + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = options.enums === String ? $root.google.cloud.config.v1.ResourceChange.Intent[message.intent] === undefined ? message.intent : $root.google.cloud.config.v1.ResourceChange.Intent[message.intent] : message.intent; + if (message.propertyChanges && message.propertyChanges.length) { + object.propertyChanges = []; + for (var j = 0; j < message.propertyChanges.length; ++j) + object.propertyChanges[j] = $root.google.cloud.config.v1.PropertyChange.toObject(message.propertyChanges[j], options); + } + return object; + }; + + /** + * Converts this ResourceChange to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ResourceChange + * @instance + * @returns {Object.} JSON object + */ + ResourceChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceChange + * @function getTypeUrl + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ResourceChange"; + }; + + /** + * Intent enum. + * @name google.cloud.config.v1.ResourceChange.Intent + * @enum {number} + * @property {number} INTENT_UNSPECIFIED=0 INTENT_UNSPECIFIED value + * @property {number} CREATE=1 CREATE value + * @property {number} UPDATE=2 UPDATE value + * @property {number} DELETE=3 DELETE value + * @property {number} RECREATE=4 RECREATE value + * @property {number} UNCHANGED=5 UNCHANGED value + */ + ResourceChange.Intent = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE"] = 1; + values[valuesById[2] = "UPDATE"] = 2; + values[valuesById[3] = "DELETE"] = 3; + values[valuesById[4] = "RECREATE"] = 4; + values[valuesById[5] = "UNCHANGED"] = 5; + return values; + })(); + + return ResourceChange; + })(); + + v1.PropertyChange = (function() { + + /** + * Properties of a PropertyChange. + * @memberof google.cloud.config.v1 + * @interface IPropertyChange + * @property {string|null} [path] PropertyChange path + * @property {Array.|null} [beforeSensitivePaths] PropertyChange beforeSensitivePaths + * @property {google.protobuf.IValue|null} [before] PropertyChange before + * @property {Array.|null} [afterSensitivePaths] PropertyChange afterSensitivePaths + * @property {google.protobuf.IValue|null} [after] PropertyChange after + */ + + /** + * Constructs a new PropertyChange. + * @memberof google.cloud.config.v1 + * @classdesc Represents a PropertyChange. + * @implements IPropertyChange + * @constructor + * @param {google.cloud.config.v1.IPropertyChange=} [properties] Properties to set + */ + function PropertyChange(properties) { + this.beforeSensitivePaths = []; + this.afterSensitivePaths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PropertyChange path. + * @member {string} path + * @memberof google.cloud.config.v1.PropertyChange + * @instance + */ + PropertyChange.prototype.path = ""; + + /** + * PropertyChange beforeSensitivePaths. + * @member {Array.} beforeSensitivePaths + * @memberof google.cloud.config.v1.PropertyChange + * @instance + */ + PropertyChange.prototype.beforeSensitivePaths = $util.emptyArray; + + /** + * PropertyChange before. + * @member {google.protobuf.IValue|null|undefined} before + * @memberof google.cloud.config.v1.PropertyChange + * @instance + */ + PropertyChange.prototype.before = null; + + /** + * PropertyChange afterSensitivePaths. + * @member {Array.} afterSensitivePaths + * @memberof google.cloud.config.v1.PropertyChange + * @instance + */ + PropertyChange.prototype.afterSensitivePaths = $util.emptyArray; + + /** + * PropertyChange after. + * @member {google.protobuf.IValue|null|undefined} after + * @memberof google.cloud.config.v1.PropertyChange + * @instance + */ + PropertyChange.prototype.after = null; + + /** + * Creates a new PropertyChange instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {google.cloud.config.v1.IPropertyChange=} [properties] Properties to set + * @returns {google.cloud.config.v1.PropertyChange} PropertyChange instance + */ + PropertyChange.create = function create(properties) { + return new PropertyChange(properties); + }; + + /** + * Encodes the specified PropertyChange message. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {google.cloud.config.v1.IPropertyChange} message PropertyChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.beforeSensitivePaths != null && message.beforeSensitivePaths.length) + for (var i = 0; i < message.beforeSensitivePaths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.beforeSensitivePaths[i]); + if (message.before != null && Object.hasOwnProperty.call(message, "before")) + $root.google.protobuf.Value.encode(message.before, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.afterSensitivePaths != null && message.afterSensitivePaths.length) + for (var i = 0; i < message.afterSensitivePaths.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.afterSensitivePaths[i]); + if (message.after != null && Object.hasOwnProperty.call(message, "after")) + $root.google.protobuf.Value.encode(message.after, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PropertyChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {google.cloud.config.v1.IPropertyChange} message PropertyChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyChange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.PropertyChange} PropertyChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyChange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PropertyChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.path = reader.string(); + break; + } + case 2: { + if (!(message.beforeSensitivePaths && message.beforeSensitivePaths.length)) + message.beforeSensitivePaths = []; + message.beforeSensitivePaths.push(reader.string()); + break; + } + case 3: { + message.before = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.afterSensitivePaths && message.afterSensitivePaths.length)) + message.afterSensitivePaths = []; + message.afterSensitivePaths.push(reader.string()); + break; + } + case 5: { + message.after = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.PropertyChange} PropertyChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyChange message. + * @function verify + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.beforeSensitivePaths != null && message.hasOwnProperty("beforeSensitivePaths")) { + if (!Array.isArray(message.beforeSensitivePaths)) + return "beforeSensitivePaths: array expected"; + for (var i = 0; i < message.beforeSensitivePaths.length; ++i) + if (!$util.isString(message.beforeSensitivePaths[i])) + return "beforeSensitivePaths: string[] expected"; + } + if (message.before != null && message.hasOwnProperty("before")) { + var error = $root.google.protobuf.Value.verify(message.before); + if (error) + return "before." + error; + } + if (message.afterSensitivePaths != null && message.hasOwnProperty("afterSensitivePaths")) { + if (!Array.isArray(message.afterSensitivePaths)) + return "afterSensitivePaths: array expected"; + for (var i = 0; i < message.afterSensitivePaths.length; ++i) + if (!$util.isString(message.afterSensitivePaths[i])) + return "afterSensitivePaths: string[] expected"; + } + if (message.after != null && message.hasOwnProperty("after")) { + var error = $root.google.protobuf.Value.verify(message.after); + if (error) + return "after." + error; + } + return null; + }; + + /** + * Creates a PropertyChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.PropertyChange} PropertyChange + */ + PropertyChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.PropertyChange) + return object; + var message = new $root.google.cloud.config.v1.PropertyChange(); + if (object.path != null) + message.path = String(object.path); + if (object.beforeSensitivePaths) { + if (!Array.isArray(object.beforeSensitivePaths)) + throw TypeError(".google.cloud.config.v1.PropertyChange.beforeSensitivePaths: array expected"); + message.beforeSensitivePaths = []; + for (var i = 0; i < object.beforeSensitivePaths.length; ++i) + message.beforeSensitivePaths[i] = String(object.beforeSensitivePaths[i]); + } + if (object.before != null) { + if (typeof object.before !== "object") + throw TypeError(".google.cloud.config.v1.PropertyChange.before: object expected"); + message.before = $root.google.protobuf.Value.fromObject(object.before); + } + if (object.afterSensitivePaths) { + if (!Array.isArray(object.afterSensitivePaths)) + throw TypeError(".google.cloud.config.v1.PropertyChange.afterSensitivePaths: array expected"); + message.afterSensitivePaths = []; + for (var i = 0; i < object.afterSensitivePaths.length; ++i) + message.afterSensitivePaths[i] = String(object.afterSensitivePaths[i]); + } + if (object.after != null) { + if (typeof object.after !== "object") + throw TypeError(".google.cloud.config.v1.PropertyChange.after: object expected"); + message.after = $root.google.protobuf.Value.fromObject(object.after); + } + return message; + }; + + /** + * Creates a plain object from a PropertyChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {google.cloud.config.v1.PropertyChange} message PropertyChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.beforeSensitivePaths = []; + object.afterSensitivePaths = []; + } + if (options.defaults) { + object.path = ""; + object.before = null; + object.after = null; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.beforeSensitivePaths && message.beforeSensitivePaths.length) { + object.beforeSensitivePaths = []; + for (var j = 0; j < message.beforeSensitivePaths.length; ++j) + object.beforeSensitivePaths[j] = message.beforeSensitivePaths[j]; + } + if (message.before != null && message.hasOwnProperty("before")) + object.before = $root.google.protobuf.Value.toObject(message.before, options); + if (message.afterSensitivePaths && message.afterSensitivePaths.length) { + object.afterSensitivePaths = []; + for (var j = 0; j < message.afterSensitivePaths.length; ++j) + object.afterSensitivePaths[j] = message.afterSensitivePaths[j]; + } + if (message.after != null && message.hasOwnProperty("after")) + object.after = $root.google.protobuf.Value.toObject(message.after, options); + return object; + }; + + /** + * Converts this PropertyChange to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.PropertyChange + * @instance + * @returns {Object.} JSON object + */ + PropertyChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyChange + * @function getTypeUrl + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.PropertyChange"; + }; + + return PropertyChange; + })(); + + v1.ListResourceChangesRequest = (function() { + + /** + * Properties of a ListResourceChangesRequest. + * @memberof google.cloud.config.v1 + * @interface IListResourceChangesRequest + * @property {string|null} [parent] ListResourceChangesRequest parent + * @property {number|null} [pageSize] ListResourceChangesRequest pageSize + * @property {string|null} [pageToken] ListResourceChangesRequest pageToken + * @property {string|null} [filter] ListResourceChangesRequest filter + * @property {string|null} [orderBy] ListResourceChangesRequest orderBy + */ + + /** + * Constructs a new ListResourceChangesRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListResourceChangesRequest. + * @implements IListResourceChangesRequest + * @constructor + * @param {google.cloud.config.v1.IListResourceChangesRequest=} [properties] Properties to set + */ + function ListResourceChangesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListResourceChangesRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + */ + ListResourceChangesRequest.prototype.parent = ""; + + /** + * ListResourceChangesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + */ + ListResourceChangesRequest.prototype.pageSize = 0; + + /** + * ListResourceChangesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + */ + ListResourceChangesRequest.prototype.pageToken = ""; + + /** + * ListResourceChangesRequest filter. + * @member {string} filter + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + */ + ListResourceChangesRequest.prototype.filter = ""; + + /** + * ListResourceChangesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + */ + ListResourceChangesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListResourceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {google.cloud.config.v1.IListResourceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest instance + */ + ListResourceChangesRequest.create = function create(properties) { + return new ListResourceChangesRequest(properties); + }; + + /** + * Encodes the specified ListResourceChangesRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {google.cloud.config.v1.IListResourceChangesRequest} message ListResourceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceChangesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListResourceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {google.cloud.config.v1.IListResourceChangesRequest} message ListResourceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListResourceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceChangesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListResourceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListResourceChangesRequest message. + * @function verify + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListResourceChangesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListResourceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest + */ + ListResourceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListResourceChangesRequest) + return object; + var message = new $root.google.cloud.config.v1.ListResourceChangesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListResourceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {google.cloud.config.v1.ListResourceChangesRequest} message ListResourceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListResourceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListResourceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + ListResourceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListResourceChangesRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListResourceChangesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListResourceChangesRequest"; + }; + + return ListResourceChangesRequest; + })(); + + v1.ListResourceChangesResponse = (function() { + + /** + * Properties of a ListResourceChangesResponse. + * @memberof google.cloud.config.v1 + * @interface IListResourceChangesResponse + * @property {Array.|null} [resourceChanges] ListResourceChangesResponse resourceChanges + * @property {string|null} [nextPageToken] ListResourceChangesResponse nextPageToken + * @property {Array.|null} [unreachable] ListResourceChangesResponse unreachable + */ + + /** + * Constructs a new ListResourceChangesResponse. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListResourceChangesResponse. + * @implements IListResourceChangesResponse + * @constructor + * @param {google.cloud.config.v1.IListResourceChangesResponse=} [properties] Properties to set + */ + function ListResourceChangesResponse(properties) { + this.resourceChanges = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListResourceChangesResponse resourceChanges. + * @member {Array.} resourceChanges + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @instance + */ + ListResourceChangesResponse.prototype.resourceChanges = $util.emptyArray; + + /** + * ListResourceChangesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @instance + */ + ListResourceChangesResponse.prototype.nextPageToken = ""; + + /** + * ListResourceChangesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @instance + */ + ListResourceChangesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListResourceChangesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {google.cloud.config.v1.IListResourceChangesResponse=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse instance + */ + ListResourceChangesResponse.create = function create(properties) { + return new ListResourceChangesResponse(properties); + }; + + /** + * Encodes the specified ListResourceChangesResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {google.cloud.config.v1.IListResourceChangesResponse} message ListResourceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceChangesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceChanges != null && message.resourceChanges.length) + for (var i = 0; i < message.resourceChanges.length; ++i) + $root.google.cloud.config.v1.ResourceChange.encode(message.resourceChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListResourceChangesResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {google.cloud.config.v1.IListResourceChangesResponse} message ListResourceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceChangesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListResourceChangesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceChangesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceChangesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.resourceChanges && message.resourceChanges.length)) + message.resourceChanges = []; + message.resourceChanges.push($root.google.cloud.config.v1.ResourceChange.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListResourceChangesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceChangesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListResourceChangesResponse message. + * @function verify + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListResourceChangesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceChanges != null && message.hasOwnProperty("resourceChanges")) { + if (!Array.isArray(message.resourceChanges)) + return "resourceChanges: array expected"; + for (var i = 0; i < message.resourceChanges.length; ++i) { + var error = $root.google.cloud.config.v1.ResourceChange.verify(message.resourceChanges[i]); + if (error) + return "resourceChanges." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListResourceChangesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse + */ + ListResourceChangesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListResourceChangesResponse) + return object; + var message = new $root.google.cloud.config.v1.ListResourceChangesResponse(); + if (object.resourceChanges) { + if (!Array.isArray(object.resourceChanges)) + throw TypeError(".google.cloud.config.v1.ListResourceChangesResponse.resourceChanges: array expected"); + message.resourceChanges = []; + for (var i = 0; i < object.resourceChanges.length; ++i) { + if (typeof object.resourceChanges[i] !== "object") + throw TypeError(".google.cloud.config.v1.ListResourceChangesResponse.resourceChanges: object expected"); + message.resourceChanges[i] = $root.google.cloud.config.v1.ResourceChange.fromObject(object.resourceChanges[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.config.v1.ListResourceChangesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListResourceChangesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {google.cloud.config.v1.ListResourceChangesResponse} message ListResourceChangesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListResourceChangesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resourceChanges = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.resourceChanges && message.resourceChanges.length) { + object.resourceChanges = []; + for (var j = 0; j < message.resourceChanges.length; ++j) + object.resourceChanges[j] = $root.google.cloud.config.v1.ResourceChange.toObject(message.resourceChanges[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListResourceChangesResponse to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @instance + * @returns {Object.} JSON object + */ + ListResourceChangesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListResourceChangesResponse + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListResourceChangesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListResourceChangesResponse"; + }; + + return ListResourceChangesResponse; + })(); + + v1.GetResourceChangeRequest = (function() { + + /** + * Properties of a GetResourceChangeRequest. + * @memberof google.cloud.config.v1 + * @interface IGetResourceChangeRequest + * @property {string|null} [name] GetResourceChangeRequest name + */ + + /** + * Constructs a new GetResourceChangeRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GetResourceChangeRequest. + * @implements IGetResourceChangeRequest + * @constructor + * @param {google.cloud.config.v1.IGetResourceChangeRequest=} [properties] Properties to set + */ + function GetResourceChangeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetResourceChangeRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @instance + */ + GetResourceChangeRequest.prototype.name = ""; + + /** + * Creates a new GetResourceChangeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {google.cloud.config.v1.IGetResourceChangeRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest instance + */ + GetResourceChangeRequest.create = function create(properties) { + return new GetResourceChangeRequest(properties); + }; + + /** + * Encodes the specified GetResourceChangeRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {google.cloud.config.v1.IGetResourceChangeRequest} message GetResourceChangeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetResourceChangeRequest.encode = function encode(message, writer) { + 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 GetResourceChangeRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {google.cloud.config.v1.IGetResourceChangeRequest} message GetResourceChangeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetResourceChangeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetResourceChangeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetResourceChangeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetResourceChangeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetResourceChangeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetResourceChangeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetResourceChangeRequest message. + * @function verify + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetResourceChangeRequest.verify = function verify(message) { + if (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 GetResourceChangeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest + */ + GetResourceChangeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GetResourceChangeRequest) + return object; + var message = new $root.google.cloud.config.v1.GetResourceChangeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetResourceChangeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {google.cloud.config.v1.GetResourceChangeRequest} message GetResourceChangeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetResourceChangeRequest.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 GetResourceChangeRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @instance + * @returns {Object.} JSON object + */ + GetResourceChangeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetResourceChangeRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetResourceChangeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GetResourceChangeRequest"; + }; + + return GetResourceChangeRequest; + })(); + + v1.ResourceDriftTerraformInfo = (function() { + + /** + * Properties of a ResourceDriftTerraformInfo. + * @memberof google.cloud.config.v1 + * @interface IResourceDriftTerraformInfo + * @property {string|null} [address] ResourceDriftTerraformInfo address + * @property {string|null} [type] ResourceDriftTerraformInfo type + * @property {string|null} [resourceName] ResourceDriftTerraformInfo resourceName + * @property {string|null} [provider] ResourceDriftTerraformInfo provider + */ + + /** + * Constructs a new ResourceDriftTerraformInfo. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ResourceDriftTerraformInfo. + * @implements IResourceDriftTerraformInfo + * @constructor + * @param {google.cloud.config.v1.IResourceDriftTerraformInfo=} [properties] Properties to set + */ + function ResourceDriftTerraformInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDriftTerraformInfo address. + * @member {string} address + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @instance + */ + ResourceDriftTerraformInfo.prototype.address = ""; + + /** + * ResourceDriftTerraformInfo type. + * @member {string} type + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @instance + */ + ResourceDriftTerraformInfo.prototype.type = ""; + + /** + * ResourceDriftTerraformInfo resourceName. + * @member {string} resourceName + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @instance + */ + ResourceDriftTerraformInfo.prototype.resourceName = ""; + + /** + * ResourceDriftTerraformInfo provider. + * @member {string} provider + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @instance + */ + ResourceDriftTerraformInfo.prototype.provider = ""; + + /** + * Creates a new ResourceDriftTerraformInfo instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceDriftTerraformInfo=} [properties] Properties to set + * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo instance + */ + ResourceDriftTerraformInfo.create = function create(properties) { + return new ResourceDriftTerraformInfo(properties); + }; + + /** + * Encodes the specified ResourceDriftTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceDriftTerraformInfo} message ResourceDriftTerraformInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDriftTerraformInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.provider); + return writer; + }; + + /** + * Encodes the specified ResourceDriftTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceDriftTerraformInfo} message ResourceDriftTerraformInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDriftTerraformInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDriftTerraformInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceDriftTerraformInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.address = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + message.resourceName = reader.string(); + break; + } + case 4: { + message.provider = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDriftTerraformInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDriftTerraformInfo message. + * @function verify + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDriftTerraformInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.provider != null && message.hasOwnProperty("provider")) + if (!$util.isString(message.provider)) + return "provider: string expected"; + return null; + }; + + /** + * Creates a ResourceDriftTerraformInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo + */ + ResourceDriftTerraformInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ResourceDriftTerraformInfo) + return object; + var message = new $root.google.cloud.config.v1.ResourceDriftTerraformInfo(); + if (object.address != null) + message.address = String(object.address); + if (object.type != null) + message.type = String(object.type); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.provider != null) + message.provider = String(object.provider); + return message; + }; + + /** + * Creates a plain object from a ResourceDriftTerraformInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {google.cloud.config.v1.ResourceDriftTerraformInfo} message ResourceDriftTerraformInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDriftTerraformInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.address = ""; + object.type = ""; + object.resourceName = ""; + object.provider = ""; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = message.provider; + return object; + }; + + /** + * Converts this ResourceDriftTerraformInfo to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @instance + * @returns {Object.} JSON object + */ + ResourceDriftTerraformInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDriftTerraformInfo + * @function getTypeUrl + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDriftTerraformInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ResourceDriftTerraformInfo"; + }; + + return ResourceDriftTerraformInfo; + })(); + + v1.ResourceDrift = (function() { + + /** + * Properties of a ResourceDrift. + * @memberof google.cloud.config.v1 + * @interface IResourceDrift + * @property {string|null} [name] ResourceDrift name + * @property {google.cloud.config.v1.IResourceDriftTerraformInfo|null} [terraformInfo] ResourceDrift terraformInfo + * @property {Array.|null} [propertyDrifts] ResourceDrift propertyDrifts + */ + + /** + * Constructs a new ResourceDrift. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ResourceDrift. + * @implements IResourceDrift + * @constructor + * @param {google.cloud.config.v1.IResourceDrift=} [properties] Properties to set + */ + function ResourceDrift(properties) { + this.propertyDrifts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDrift name. + * @member {string} name + * @memberof google.cloud.config.v1.ResourceDrift + * @instance + */ + ResourceDrift.prototype.name = ""; + + /** + * ResourceDrift terraformInfo. + * @member {google.cloud.config.v1.IResourceDriftTerraformInfo|null|undefined} terraformInfo + * @memberof google.cloud.config.v1.ResourceDrift + * @instance + */ + ResourceDrift.prototype.terraformInfo = null; + + /** + * ResourceDrift propertyDrifts. + * @member {Array.} propertyDrifts + * @memberof google.cloud.config.v1.ResourceDrift + * @instance + */ + ResourceDrift.prototype.propertyDrifts = $util.emptyArray; + + /** + * Creates a new ResourceDrift instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {google.cloud.config.v1.IResourceDrift=} [properties] Properties to set + * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift instance + */ + ResourceDrift.create = function create(properties) { + return new ResourceDrift(properties); + }; + + /** + * Encodes the specified ResourceDrift message. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {google.cloud.config.v1.IResourceDrift} message ResourceDrift message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDrift.encode = function encode(message, writer) { + 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.terraformInfo != null && Object.hasOwnProperty.call(message, "terraformInfo")) + $root.google.cloud.config.v1.ResourceDriftTerraformInfo.encode(message.terraformInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.propertyDrifts != null && message.propertyDrifts.length) + for (var i = 0; i < message.propertyDrifts.length; ++i) + $root.google.cloud.config.v1.PropertyDrift.encode(message.propertyDrifts[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {google.cloud.config.v1.IResourceDrift} message ResourceDrift message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDrift.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDrift message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDrift.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceDrift(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.terraformInfo = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.propertyDrifts && message.propertyDrifts.length)) + message.propertyDrifts = []; + message.propertyDrifts.push($root.google.cloud.config.v1.PropertyDrift.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDrift message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDrift.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDrift message. + * @function verify + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDrift.verify = function verify(message) { + if (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.terraformInfo != null && message.hasOwnProperty("terraformInfo")) { + var error = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.verify(message.terraformInfo); + if (error) + return "terraformInfo." + error; + } + if (message.propertyDrifts != null && message.hasOwnProperty("propertyDrifts")) { + if (!Array.isArray(message.propertyDrifts)) + return "propertyDrifts: array expected"; + for (var i = 0; i < message.propertyDrifts.length; ++i) { + var error = $root.google.cloud.config.v1.PropertyDrift.verify(message.propertyDrifts[i]); + if (error) + return "propertyDrifts." + error; + } + } + return null; + }; + + /** + * Creates a ResourceDrift message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift + */ + ResourceDrift.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ResourceDrift) + return object; + var message = new $root.google.cloud.config.v1.ResourceDrift(); + if (object.name != null) + message.name = String(object.name); + if (object.terraformInfo != null) { + if (typeof object.terraformInfo !== "object") + throw TypeError(".google.cloud.config.v1.ResourceDrift.terraformInfo: object expected"); + message.terraformInfo = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.fromObject(object.terraformInfo); + } + if (object.propertyDrifts) { + if (!Array.isArray(object.propertyDrifts)) + throw TypeError(".google.cloud.config.v1.ResourceDrift.propertyDrifts: array expected"); + message.propertyDrifts = []; + for (var i = 0; i < object.propertyDrifts.length; ++i) { + if (typeof object.propertyDrifts[i] !== "object") + throw TypeError(".google.cloud.config.v1.ResourceDrift.propertyDrifts: object expected"); + message.propertyDrifts[i] = $root.google.cloud.config.v1.PropertyDrift.fromObject(object.propertyDrifts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDrift message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {google.cloud.config.v1.ResourceDrift} message ResourceDrift + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDrift.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.propertyDrifts = []; + if (options.defaults) { + object.name = ""; + object.terraformInfo = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.terraformInfo != null && message.hasOwnProperty("terraformInfo")) + object.terraformInfo = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.toObject(message.terraformInfo, options); + if (message.propertyDrifts && message.propertyDrifts.length) { + object.propertyDrifts = []; + for (var j = 0; j < message.propertyDrifts.length; ++j) + object.propertyDrifts[j] = $root.google.cloud.config.v1.PropertyDrift.toObject(message.propertyDrifts[j], options); + } + return object; + }; + + /** + * Converts this ResourceDrift to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ResourceDrift + * @instance + * @returns {Object.} JSON object + */ + ResourceDrift.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDrift + * @function getTypeUrl + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDrift.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ResourceDrift"; + }; + + return ResourceDrift; + })(); + + v1.PropertyDrift = (function() { + + /** + * Properties of a PropertyDrift. + * @memberof google.cloud.config.v1 + * @interface IPropertyDrift + * @property {string|null} [path] PropertyDrift path + * @property {Array.|null} [beforeSensitivePaths] PropertyDrift beforeSensitivePaths + * @property {google.protobuf.IValue|null} [before] PropertyDrift before + * @property {Array.|null} [afterSensitivePaths] PropertyDrift afterSensitivePaths + * @property {google.protobuf.IValue|null} [after] PropertyDrift after + */ + + /** + * Constructs a new PropertyDrift. + * @memberof google.cloud.config.v1 + * @classdesc Represents a PropertyDrift. + * @implements IPropertyDrift + * @constructor + * @param {google.cloud.config.v1.IPropertyDrift=} [properties] Properties to set + */ + function PropertyDrift(properties) { + this.beforeSensitivePaths = []; + this.afterSensitivePaths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PropertyDrift path. + * @member {string} path + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + */ + PropertyDrift.prototype.path = ""; + + /** + * PropertyDrift beforeSensitivePaths. + * @member {Array.} beforeSensitivePaths + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + */ + PropertyDrift.prototype.beforeSensitivePaths = $util.emptyArray; + + /** + * PropertyDrift before. + * @member {google.protobuf.IValue|null|undefined} before + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + */ + PropertyDrift.prototype.before = null; + + /** + * PropertyDrift afterSensitivePaths. + * @member {Array.} afterSensitivePaths + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + */ + PropertyDrift.prototype.afterSensitivePaths = $util.emptyArray; + + /** + * PropertyDrift after. + * @member {google.protobuf.IValue|null|undefined} after + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + */ + PropertyDrift.prototype.after = null; + + /** + * Creates a new PropertyDrift instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {google.cloud.config.v1.IPropertyDrift=} [properties] Properties to set + * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift instance + */ + PropertyDrift.create = function create(properties) { + return new PropertyDrift(properties); + }; + + /** + * Encodes the specified PropertyDrift message. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {google.cloud.config.v1.IPropertyDrift} message PropertyDrift message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyDrift.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.beforeSensitivePaths != null && message.beforeSensitivePaths.length) + for (var i = 0; i < message.beforeSensitivePaths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.beforeSensitivePaths[i]); + if (message.before != null && Object.hasOwnProperty.call(message, "before")) + $root.google.protobuf.Value.encode(message.before, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.afterSensitivePaths != null && message.afterSensitivePaths.length) + for (var i = 0; i < message.afterSensitivePaths.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.afterSensitivePaths[i]); + if (message.after != null && Object.hasOwnProperty.call(message, "after")) + $root.google.protobuf.Value.encode(message.after, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PropertyDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {google.cloud.config.v1.IPropertyDrift} message PropertyDrift message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyDrift.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyDrift message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyDrift.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PropertyDrift(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.path = reader.string(); + break; + } + case 2: { + if (!(message.beforeSensitivePaths && message.beforeSensitivePaths.length)) + message.beforeSensitivePaths = []; + message.beforeSensitivePaths.push(reader.string()); + break; + } + case 3: { + message.before = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.afterSensitivePaths && message.afterSensitivePaths.length)) + message.afterSensitivePaths = []; + message.afterSensitivePaths.push(reader.string()); + break; + } + case 5: { + message.after = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyDrift message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyDrift.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyDrift message. + * @function verify + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyDrift.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.beforeSensitivePaths != null && message.hasOwnProperty("beforeSensitivePaths")) { + if (!Array.isArray(message.beforeSensitivePaths)) + return "beforeSensitivePaths: array expected"; + for (var i = 0; i < message.beforeSensitivePaths.length; ++i) + if (!$util.isString(message.beforeSensitivePaths[i])) + return "beforeSensitivePaths: string[] expected"; + } + if (message.before != null && message.hasOwnProperty("before")) { + var error = $root.google.protobuf.Value.verify(message.before); + if (error) + return "before." + error; + } + if (message.afterSensitivePaths != null && message.hasOwnProperty("afterSensitivePaths")) { + if (!Array.isArray(message.afterSensitivePaths)) + return "afterSensitivePaths: array expected"; + for (var i = 0; i < message.afterSensitivePaths.length; ++i) + if (!$util.isString(message.afterSensitivePaths[i])) + return "afterSensitivePaths: string[] expected"; + } + if (message.after != null && message.hasOwnProperty("after")) { + var error = $root.google.protobuf.Value.verify(message.after); + if (error) + return "after." + error; + } + return null; + }; + + /** + * Creates a PropertyDrift message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift + */ + PropertyDrift.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.PropertyDrift) + return object; + var message = new $root.google.cloud.config.v1.PropertyDrift(); + if (object.path != null) + message.path = String(object.path); + if (object.beforeSensitivePaths) { + if (!Array.isArray(object.beforeSensitivePaths)) + throw TypeError(".google.cloud.config.v1.PropertyDrift.beforeSensitivePaths: array expected"); + message.beforeSensitivePaths = []; + for (var i = 0; i < object.beforeSensitivePaths.length; ++i) + message.beforeSensitivePaths[i] = String(object.beforeSensitivePaths[i]); + } + if (object.before != null) { + if (typeof object.before !== "object") + throw TypeError(".google.cloud.config.v1.PropertyDrift.before: object expected"); + message.before = $root.google.protobuf.Value.fromObject(object.before); + } + if (object.afterSensitivePaths) { + if (!Array.isArray(object.afterSensitivePaths)) + throw TypeError(".google.cloud.config.v1.PropertyDrift.afterSensitivePaths: array expected"); + message.afterSensitivePaths = []; + for (var i = 0; i < object.afterSensitivePaths.length; ++i) + message.afterSensitivePaths[i] = String(object.afterSensitivePaths[i]); + } + if (object.after != null) { + if (typeof object.after !== "object") + throw TypeError(".google.cloud.config.v1.PropertyDrift.after: object expected"); + message.after = $root.google.protobuf.Value.fromObject(object.after); + } + return message; + }; + + /** + * Creates a plain object from a PropertyDrift message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {google.cloud.config.v1.PropertyDrift} message PropertyDrift + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyDrift.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.beforeSensitivePaths = []; + object.afterSensitivePaths = []; + } + if (options.defaults) { + object.path = ""; + object.before = null; + object.after = null; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.beforeSensitivePaths && message.beforeSensitivePaths.length) { + object.beforeSensitivePaths = []; + for (var j = 0; j < message.beforeSensitivePaths.length; ++j) + object.beforeSensitivePaths[j] = message.beforeSensitivePaths[j]; + } + if (message.before != null && message.hasOwnProperty("before")) + object.before = $root.google.protobuf.Value.toObject(message.before, options); + if (message.afterSensitivePaths && message.afterSensitivePaths.length) { + object.afterSensitivePaths = []; + for (var j = 0; j < message.afterSensitivePaths.length; ++j) + object.afterSensitivePaths[j] = message.afterSensitivePaths[j]; + } + if (message.after != null && message.hasOwnProperty("after")) + object.after = $root.google.protobuf.Value.toObject(message.after, options); + return object; + }; + + /** + * Converts this PropertyDrift to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + * @returns {Object.} JSON object + */ + PropertyDrift.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyDrift + * @function getTypeUrl + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyDrift.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.PropertyDrift"; + }; + + return PropertyDrift; + })(); + + v1.ListResourceDriftsRequest = (function() { + + /** + * Properties of a ListResourceDriftsRequest. + * @memberof google.cloud.config.v1 + * @interface IListResourceDriftsRequest + * @property {string|null} [parent] ListResourceDriftsRequest parent + * @property {number|null} [pageSize] ListResourceDriftsRequest pageSize + * @property {string|null} [pageToken] ListResourceDriftsRequest pageToken + * @property {string|null} [filter] ListResourceDriftsRequest filter + * @property {string|null} [orderBy] ListResourceDriftsRequest orderBy + */ + + /** + * Constructs a new ListResourceDriftsRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListResourceDriftsRequest. + * @implements IListResourceDriftsRequest + * @constructor + * @param {google.cloud.config.v1.IListResourceDriftsRequest=} [properties] Properties to set + */ + function ListResourceDriftsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListResourceDriftsRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + */ + ListResourceDriftsRequest.prototype.parent = ""; + + /** + * ListResourceDriftsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + */ + ListResourceDriftsRequest.prototype.pageSize = 0; + + /** + * ListResourceDriftsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + */ + ListResourceDriftsRequest.prototype.pageToken = ""; + + /** + * ListResourceDriftsRequest filter. + * @member {string} filter + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + */ + ListResourceDriftsRequest.prototype.filter = ""; + + /** + * ListResourceDriftsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + */ + ListResourceDriftsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListResourceDriftsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {google.cloud.config.v1.IListResourceDriftsRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest instance + */ + ListResourceDriftsRequest.create = function create(properties) { + return new ListResourceDriftsRequest(properties); + }; + + /** + * Encodes the specified ListResourceDriftsRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {google.cloud.config.v1.IListResourceDriftsRequest} message ListResourceDriftsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceDriftsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListResourceDriftsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {google.cloud.config.v1.IListResourceDriftsRequest} message ListResourceDriftsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceDriftsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListResourceDriftsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceDriftsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceDriftsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListResourceDriftsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceDriftsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListResourceDriftsRequest message. + * @function verify + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListResourceDriftsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListResourceDriftsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest + */ + ListResourceDriftsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListResourceDriftsRequest) + return object; + var message = new $root.google.cloud.config.v1.ListResourceDriftsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListResourceDriftsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {google.cloud.config.v1.ListResourceDriftsRequest} message ListResourceDriftsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListResourceDriftsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListResourceDriftsRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + * @returns {Object.} JSON object + */ + ListResourceDriftsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListResourceDriftsRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListResourceDriftsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListResourceDriftsRequest"; + }; + + return ListResourceDriftsRequest; + })(); + + v1.ListResourceDriftsResponse = (function() { + + /** + * Properties of a ListResourceDriftsResponse. + * @memberof google.cloud.config.v1 + * @interface IListResourceDriftsResponse + * @property {Array.|null} [resourceDrifts] ListResourceDriftsResponse resourceDrifts + * @property {string|null} [nextPageToken] ListResourceDriftsResponse nextPageToken + * @property {Array.|null} [unreachable] ListResourceDriftsResponse unreachable + */ + + /** + * Constructs a new ListResourceDriftsResponse. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListResourceDriftsResponse. + * @implements IListResourceDriftsResponse + * @constructor + * @param {google.cloud.config.v1.IListResourceDriftsResponse=} [properties] Properties to set + */ + function ListResourceDriftsResponse(properties) { + this.resourceDrifts = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListResourceDriftsResponse resourceDrifts. + * @member {Array.} resourceDrifts + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @instance + */ + ListResourceDriftsResponse.prototype.resourceDrifts = $util.emptyArray; + + /** + * ListResourceDriftsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @instance + */ + ListResourceDriftsResponse.prototype.nextPageToken = ""; + + /** + * ListResourceDriftsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @instance + */ + ListResourceDriftsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListResourceDriftsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {google.cloud.config.v1.IListResourceDriftsResponse=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse instance + */ + ListResourceDriftsResponse.create = function create(properties) { + return new ListResourceDriftsResponse(properties); + }; + + /** + * Encodes the specified ListResourceDriftsResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {google.cloud.config.v1.IListResourceDriftsResponse} message ListResourceDriftsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceDriftsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceDrifts != null && message.resourceDrifts.length) + for (var i = 0; i < message.resourceDrifts.length; ++i) + $root.google.cloud.config.v1.ResourceDrift.encode(message.resourceDrifts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListResourceDriftsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {google.cloud.config.v1.IListResourceDriftsResponse} message ListResourceDriftsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceDriftsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListResourceDriftsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceDriftsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceDriftsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.resourceDrifts && message.resourceDrifts.length)) + message.resourceDrifts = []; + message.resourceDrifts.push($root.google.cloud.config.v1.ResourceDrift.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListResourceDriftsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceDriftsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListResourceDriftsResponse message. + * @function verify + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListResourceDriftsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceDrifts != null && message.hasOwnProperty("resourceDrifts")) { + if (!Array.isArray(message.resourceDrifts)) + return "resourceDrifts: array expected"; + for (var i = 0; i < message.resourceDrifts.length; ++i) { + var error = $root.google.cloud.config.v1.ResourceDrift.verify(message.resourceDrifts[i]); + if (error) + return "resourceDrifts." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListResourceDriftsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse + */ + ListResourceDriftsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListResourceDriftsResponse) + return object; + var message = new $root.google.cloud.config.v1.ListResourceDriftsResponse(); + if (object.resourceDrifts) { + if (!Array.isArray(object.resourceDrifts)) + throw TypeError(".google.cloud.config.v1.ListResourceDriftsResponse.resourceDrifts: array expected"); + message.resourceDrifts = []; + for (var i = 0; i < object.resourceDrifts.length; ++i) { + if (typeof object.resourceDrifts[i] !== "object") + throw TypeError(".google.cloud.config.v1.ListResourceDriftsResponse.resourceDrifts: object expected"); + message.resourceDrifts[i] = $root.google.cloud.config.v1.ResourceDrift.fromObject(object.resourceDrifts[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.config.v1.ListResourceDriftsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListResourceDriftsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {google.cloud.config.v1.ListResourceDriftsResponse} message ListResourceDriftsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListResourceDriftsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resourceDrifts = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.resourceDrifts && message.resourceDrifts.length) { + object.resourceDrifts = []; + for (var j = 0; j < message.resourceDrifts.length; ++j) + object.resourceDrifts[j] = $root.google.cloud.config.v1.ResourceDrift.toObject(message.resourceDrifts[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListResourceDriftsResponse to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @instance + * @returns {Object.} JSON object + */ + ListResourceDriftsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListResourceDriftsResponse + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListResourceDriftsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListResourceDriftsResponse"; + }; + + return ListResourceDriftsResponse; + })(); + + v1.GetResourceDriftRequest = (function() { + + /** + * Properties of a GetResourceDriftRequest. + * @memberof google.cloud.config.v1 + * @interface IGetResourceDriftRequest + * @property {string|null} [name] GetResourceDriftRequest name + */ + + /** + * Constructs a new GetResourceDriftRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GetResourceDriftRequest. + * @implements IGetResourceDriftRequest + * @constructor + * @param {google.cloud.config.v1.IGetResourceDriftRequest=} [properties] Properties to set + */ + function GetResourceDriftRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetResourceDriftRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @instance + */ + GetResourceDriftRequest.prototype.name = ""; + + /** + * Creates a new GetResourceDriftRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {google.cloud.config.v1.IGetResourceDriftRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest instance + */ + GetResourceDriftRequest.create = function create(properties) { + return new GetResourceDriftRequest(properties); + }; + + /** + * Encodes the specified GetResourceDriftRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {google.cloud.config.v1.IGetResourceDriftRequest} message GetResourceDriftRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetResourceDriftRequest.encode = function encode(message, writer) { + 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 GetResourceDriftRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {google.cloud.config.v1.IGetResourceDriftRequest} message GetResourceDriftRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetResourceDriftRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetResourceDriftRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetResourceDriftRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetResourceDriftRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetResourceDriftRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetResourceDriftRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetResourceDriftRequest message. + * @function verify + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetResourceDriftRequest.verify = function verify(message) { + if (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 GetResourceDriftRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest + */ + GetResourceDriftRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GetResourceDriftRequest) + return object; + var message = new $root.google.cloud.config.v1.GetResourceDriftRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetResourceDriftRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {google.cloud.config.v1.GetResourceDriftRequest} message GetResourceDriftRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetResourceDriftRequest.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 GetResourceDriftRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @instance + * @returns {Object.} JSON object + */ + GetResourceDriftRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetResourceDriftRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetResourceDriftRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GetResourceDriftRequest"; + }; + + return GetResourceDriftRequest; + })(); + + v1.ProviderConfig = (function() { + + /** + * Properties of a ProviderConfig. + * @memberof google.cloud.config.v1 + * @interface IProviderConfig + * @property {google.cloud.config.v1.ProviderConfig.ProviderSource|null} [sourceType] ProviderConfig sourceType + */ + + /** + * Constructs a new ProviderConfig. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ProviderConfig. + * @implements IProviderConfig + * @constructor + * @param {google.cloud.config.v1.IProviderConfig=} [properties] Properties to set + */ + function ProviderConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProviderConfig sourceType. + * @member {google.cloud.config.v1.ProviderConfig.ProviderSource|null|undefined} sourceType + * @memberof google.cloud.config.v1.ProviderConfig + * @instance + */ + ProviderConfig.prototype.sourceType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProviderConfig.prototype, "_sourceType", { + get: $util.oneOfGetter($oneOfFields = ["sourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ProviderConfig instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ProviderConfig + * @static + * @param {google.cloud.config.v1.IProviderConfig=} [properties] Properties to set + * @returns {google.cloud.config.v1.ProviderConfig} ProviderConfig instance + */ + ProviderConfig.create = function create(properties) { + return new ProviderConfig(properties); + }; + + /** + * Encodes the specified ProviderConfig message. Does not implicitly {@link google.cloud.config.v1.ProviderConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ProviderConfig + * @static + * @param {google.cloud.config.v1.IProviderConfig} message ProviderConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProviderConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sourceType); + return writer; + }; + + /** + * Encodes the specified ProviderConfig message, length delimited. Does not implicitly {@link google.cloud.config.v1.ProviderConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ProviderConfig + * @static + * @param {google.cloud.config.v1.IProviderConfig} message ProviderConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProviderConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProviderConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ProviderConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ProviderConfig} ProviderConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProviderConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ProviderConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sourceType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProviderConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ProviderConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ProviderConfig} ProviderConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProviderConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProviderConfig message. + * @function verify + * @memberof google.cloud.config.v1.ProviderConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProviderConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) { + properties._sourceType = 1; + switch (message.sourceType) { + default: + return "sourceType: enum value expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ProviderConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ProviderConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ProviderConfig} ProviderConfig + */ + ProviderConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ProviderConfig) + return object; + var message = new $root.google.cloud.config.v1.ProviderConfig(); + switch (object.sourceType) { + default: + if (typeof object.sourceType === "number") { + message.sourceType = object.sourceType; + break; + } + break; + case "PROVIDER_SOURCE_UNSPECIFIED": + case 0: + message.sourceType = 0; + break; + case "SERVICE_MAINTAINED": + case 1: + message.sourceType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a ProviderConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ProviderConfig + * @static + * @param {google.cloud.config.v1.ProviderConfig} message ProviderConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProviderConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) { + object.sourceType = options.enums === String ? $root.google.cloud.config.v1.ProviderConfig.ProviderSource[message.sourceType] === undefined ? message.sourceType : $root.google.cloud.config.v1.ProviderConfig.ProviderSource[message.sourceType] : message.sourceType; + if (options.oneofs) + object._sourceType = "sourceType"; + } + return object; + }; + + /** + * Converts this ProviderConfig to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ProviderConfig + * @instance + * @returns {Object.} JSON object + */ + ProviderConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProviderConfig + * @function getTypeUrl + * @memberof google.cloud.config.v1.ProviderConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProviderConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ProviderConfig"; + }; + + /** + * ProviderSource enum. + * @name google.cloud.config.v1.ProviderConfig.ProviderSource + * @enum {number} + * @property {number} PROVIDER_SOURCE_UNSPECIFIED=0 PROVIDER_SOURCE_UNSPECIFIED value + * @property {number} SERVICE_MAINTAINED=1 SERVICE_MAINTAINED value + */ + ProviderConfig.ProviderSource = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROVIDER_SOURCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SERVICE_MAINTAINED"] = 1; + return values; + })(); + + return ProviderConfig; + })(); + + v1.GetAutoMigrationConfigRequest = (function() { + + /** + * Properties of a GetAutoMigrationConfigRequest. + * @memberof google.cloud.config.v1 + * @interface IGetAutoMigrationConfigRequest + * @property {string|null} [name] GetAutoMigrationConfigRequest name + */ + + /** + * Constructs a new GetAutoMigrationConfigRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GetAutoMigrationConfigRequest. + * @implements IGetAutoMigrationConfigRequest + * @constructor + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest=} [properties] Properties to set + */ + function GetAutoMigrationConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAutoMigrationConfigRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @instance + */ + GetAutoMigrationConfigRequest.prototype.name = ""; + + /** + * Creates a new GetAutoMigrationConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest instance + */ + GetAutoMigrationConfigRequest.create = function create(properties) { + return new GetAutoMigrationConfigRequest(properties); + }; + + /** + * Encodes the specified GetAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} message GetAutoMigrationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAutoMigrationConfigRequest.encode = function encode(message, writer) { + 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 GetAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} message GetAutoMigrationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAutoMigrationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAutoMigrationConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetAutoMigrationConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAutoMigrationConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAutoMigrationConfigRequest message. + * @function verify + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAutoMigrationConfigRequest.verify = function verify(message) { + if (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 GetAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest + */ + GetAutoMigrationConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GetAutoMigrationConfigRequest) + return object; + var message = new $root.google.cloud.config.v1.GetAutoMigrationConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAutoMigrationConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.GetAutoMigrationConfigRequest} message GetAutoMigrationConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAutoMigrationConfigRequest.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 GetAutoMigrationConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetAutoMigrationConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAutoMigrationConfigRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAutoMigrationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GetAutoMigrationConfigRequest"; + }; + + return GetAutoMigrationConfigRequest; + })(); + + v1.AutoMigrationConfig = (function() { + + /** + * Properties of an AutoMigrationConfig. + * @memberof google.cloud.config.v1 + * @interface IAutoMigrationConfig + * @property {string|null} [name] AutoMigrationConfig name + * @property {google.protobuf.ITimestamp|null} [updateTime] AutoMigrationConfig updateTime + * @property {boolean|null} [autoMigrationEnabled] AutoMigrationConfig autoMigrationEnabled + */ + + /** + * Constructs a new AutoMigrationConfig. + * @memberof google.cloud.config.v1 + * @classdesc Represents an AutoMigrationConfig. + * @implements IAutoMigrationConfig + * @constructor + * @param {google.cloud.config.v1.IAutoMigrationConfig=} [properties] Properties to set + */ + function AutoMigrationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoMigrationConfig name. + * @member {string} name + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @instance + */ + AutoMigrationConfig.prototype.name = ""; + + /** + * AutoMigrationConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @instance + */ + AutoMigrationConfig.prototype.updateTime = null; + + /** + * AutoMigrationConfig autoMigrationEnabled. + * @member {boolean} autoMigrationEnabled + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @instance + */ + AutoMigrationConfig.prototype.autoMigrationEnabled = false; + + /** + * Creates a new AutoMigrationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {google.cloud.config.v1.IAutoMigrationConfig=} [properties] Properties to set + * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig instance + */ + AutoMigrationConfig.create = function create(properties) { + return new AutoMigrationConfig(properties); + }; + + /** + * Encodes the specified AutoMigrationConfig message. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {google.cloud.config.v1.IAutoMigrationConfig} message AutoMigrationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoMigrationConfig.encode = function encode(message, writer) { + 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.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoMigrationEnabled != null && Object.hasOwnProperty.call(message, "autoMigrationEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.autoMigrationEnabled); + return writer; + }; + + /** + * Encodes the specified AutoMigrationConfig message, length delimited. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {google.cloud.config.v1.IAutoMigrationConfig} message AutoMigrationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoMigrationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoMigrationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoMigrationConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.AutoMigrationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.autoMigrationEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoMigrationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoMigrationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoMigrationConfig message. + * @function verify + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoMigrationConfig.verify = function verify(message) { + if (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.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.autoMigrationEnabled != null && message.hasOwnProperty("autoMigrationEnabled")) + if (typeof message.autoMigrationEnabled !== "boolean") + return "autoMigrationEnabled: boolean expected"; + return null; + }; + + /** + * Creates an AutoMigrationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig + */ + AutoMigrationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.AutoMigrationConfig) + return object; + var message = new $root.google.cloud.config.v1.AutoMigrationConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.config.v1.AutoMigrationConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.autoMigrationEnabled != null) + message.autoMigrationEnabled = Boolean(object.autoMigrationEnabled); + return message; + }; + + /** + * Creates a plain object from an AutoMigrationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {google.cloud.config.v1.AutoMigrationConfig} message AutoMigrationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoMigrationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.updateTime = null; + object.autoMigrationEnabled = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.autoMigrationEnabled != null && message.hasOwnProperty("autoMigrationEnabled")) + object.autoMigrationEnabled = message.autoMigrationEnabled; + return object; + }; + + /** + * Converts this AutoMigrationConfig to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @instance + * @returns {Object.} JSON object + */ + AutoMigrationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoMigrationConfig + * @function getTypeUrl + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoMigrationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.AutoMigrationConfig"; + }; + + return AutoMigrationConfig; + })(); + + v1.UpdateAutoMigrationConfigRequest = (function() { + + /** + * Properties of an UpdateAutoMigrationConfigRequest. + * @memberof google.cloud.config.v1 + * @interface IUpdateAutoMigrationConfigRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAutoMigrationConfigRequest updateMask + * @property {google.cloud.config.v1.IAutoMigrationConfig|null} [autoMigrationConfig] UpdateAutoMigrationConfigRequest autoMigrationConfig + */ + + /** + * Constructs a new UpdateAutoMigrationConfigRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents an UpdateAutoMigrationConfigRequest. + * @implements IUpdateAutoMigrationConfigRequest + * @constructor + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest=} [properties] Properties to set + */ + function UpdateAutoMigrationConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAutoMigrationConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @instance + */ + UpdateAutoMigrationConfigRequest.prototype.updateMask = null; + + /** + * UpdateAutoMigrationConfigRequest autoMigrationConfig. + * @member {google.cloud.config.v1.IAutoMigrationConfig|null|undefined} autoMigrationConfig + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @instance + */ + UpdateAutoMigrationConfigRequest.prototype.autoMigrationConfig = null; + + /** + * Creates a new UpdateAutoMigrationConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest instance + */ + UpdateAutoMigrationConfigRequest.create = function create(properties) { + return new UpdateAutoMigrationConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} message UpdateAutoMigrationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAutoMigrationConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.autoMigrationConfig != null && Object.hasOwnProperty.call(message, "autoMigrationConfig")) + $root.google.cloud.config.v1.AutoMigrationConfig.encode(message.autoMigrationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} message UpdateAutoMigrationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAutoMigrationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAutoMigrationConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.autoMigrationConfig = $root.google.cloud.config.v1.AutoMigrationConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAutoMigrationConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAutoMigrationConfigRequest message. + * @function verify + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAutoMigrationConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.autoMigrationConfig != null && message.hasOwnProperty("autoMigrationConfig")) { + var error = $root.google.cloud.config.v1.AutoMigrationConfig.verify(message.autoMigrationConfig); + if (error) + return "autoMigrationConfig." + error; + } + return null; + }; + + /** + * Creates an UpdateAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest + */ + UpdateAutoMigrationConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest) + return object; + var message = new $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.config.v1.UpdateAutoMigrationConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.autoMigrationConfig != null) { + if (typeof object.autoMigrationConfig !== "object") + throw TypeError(".google.cloud.config.v1.UpdateAutoMigrationConfigRequest.autoMigrationConfig: object expected"); + message.autoMigrationConfig = $root.google.cloud.config.v1.AutoMigrationConfig.fromObject(object.autoMigrationConfig); + } + return message; + }; + + /** + * Creates a plain object from an UpdateAutoMigrationConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} message UpdateAutoMigrationConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAutoMigrationConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.autoMigrationConfig = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.autoMigrationConfig != null && message.hasOwnProperty("autoMigrationConfig")) + object.autoMigrationConfig = $root.google.cloud.config.v1.AutoMigrationConfig.toObject(message.autoMigrationConfig, options); + return object; + }; + + /** + * Converts this UpdateAutoMigrationConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAutoMigrationConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAutoMigrationConfigRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAutoMigrationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.UpdateAutoMigrationConfigRequest"; + }; + + return UpdateAutoMigrationConfigRequest; + })(); + + return v1; + })(); + + return config; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + 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.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + 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.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.FieldInfo = (function() { + + /** + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + */ + + /** + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo + * @constructor + * @param {google.api.IFieldInfo=} [properties] Properties to set + */ + function FieldInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.format = 0; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @function create + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance + */ + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); + }; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encode + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + return writer; + }; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldInfo message. + * @function verify + * @memberof google.api.FieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.FieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.FieldInfo} FieldInfo + */ + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) + return object; + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.FieldInfo + * @static + * @param {google.api.FieldInfo} message FieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this FieldInfo to JSON. + * @function toJSON + * @memberof google.api.FieldInfo + * @instance + * @returns {Object.} JSON object + */ + FieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldInfo + * @function getTypeUrl + * @memberof google.api.FieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.FieldInfo"; + }; + + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + 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: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + 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]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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 + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + 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 + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * 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 = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 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); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + 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, error) { + 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(); + if (tag === error) + break; + 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; + } + case 14: { + message.edition = reader.int32(); + 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"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + 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); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + 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 = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + 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; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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() { + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * 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 = []; + this.declaration = []; + if (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; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * 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.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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, error) { + 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(); + if (tag === error) + break; + 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 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + 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; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + 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]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + 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.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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); + }; + + /** + * 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"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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 + * @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_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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} [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 {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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 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 50: { + message.features = $root.google.protobuf.FeatureSet.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; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + 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.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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + 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] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + 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.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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 + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.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; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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; + })(); + + 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} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + 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 unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = 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 debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = 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 FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + 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) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + 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(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.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; + } + 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 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.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"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + 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) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + 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.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + 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.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + object[".google.api.fieldInfo"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + 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] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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 + * @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; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.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; + } + } + 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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 (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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); + }; + + /** + * 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; + })(); + + 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 {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @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 deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.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; + } + } + 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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); + }; + + /** + * 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; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + 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; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + 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); + }; + + /** + * 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; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @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 + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * 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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * 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"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + 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.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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; + } + case 525000001: { + message[".google.api.apiVersion"] = 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + 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.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + 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); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.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; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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 + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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 >= 0) + 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); + }; + + /** + * 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() { + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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() { + + /** + * 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 + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * 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; + + /** + * 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 + * @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); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + 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, error) { + 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(); + if (tag === error) + break; + 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; + } + case 5: { + message.semantic = 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"; + 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; + }; + + /** + * 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; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + 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; + }; + + /** + * 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; + object.semantic = options.enums === String ? "NONE" : 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; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * 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); + }; + + /** + * 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; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ + + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.protobuf.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; + + return Struct; + })(); + + protobuf.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ + + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = null; + + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = null; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.nullValue = reader.int32(); + break; + } + case 2: { + message.numberValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.protobuf.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) + return object; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.protobuf.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; + + return Value; + })(); + + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { + + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ + + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; + + /** + * Creates a new ListValue instance using the specified properties. + * @function create + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListValue message. + * @function verify + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object + */ + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; + + return ListValue; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-cloud-config/protos/protos.json b/owl-bot-staging/google-cloud-config/protos/protos.json new file mode 100644 index 00000000000..e5bbde9c1d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/protos/protos.json @@ -0,0 +1,5103 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "config": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.Config.V1", + "go_package": "cloud.google.com/go/config/apiv1/configpb;configpb", + "java_multiple_files": true, + "java_outer_classname": "ConfigProto", + "java_package": "com.google.cloud.config.v1", + "php_namespace": "Google\\Cloud\\Config\\V1", + "ruby_package": "Google::Cloud::ConfigService::V1", + "(google.api.resource_definition).type": "cloudbuild.googleapis.com/WorkerPool", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/workerPools/{worker_pool}" + }, + "nested": { + "Config": { + "options": { + "(google.api.default_host)": "config.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListDeployments": { + "requestType": "ListDeploymentsRequest", + "responseType": "ListDeploymentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/deployments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/deployments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDeployment": { + "requestType": "GetDeploymentRequest", + "responseType": "Deployment", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/deployments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/deployments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateDeployment": { + "requestType": "CreateDeploymentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/deployments", + "(google.api.http).body": "deployment", + "(google.api.method_signature)": "parent,deployment,deployment_id", + "(google.longrunning.operation_info).response_type": "Deployment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/deployments", + "body": "deployment" + } + }, + { + "(google.api.method_signature)": "parent,deployment,deployment_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Deployment", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateDeployment": { + "requestType": "UpdateDeploymentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{deployment.name=projects/*/locations/*/deployments/*}", + "(google.api.http).body": "deployment", + "(google.api.method_signature)": "deployment,update_mask", + "(google.longrunning.operation_info).response_type": "Deployment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{deployment.name=projects/*/locations/*/deployments/*}", + "body": "deployment" + } + }, + { + "(google.api.method_signature)": "deployment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Deployment", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteDeployment": { + "requestType": "DeleteDeploymentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/deployments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "Deployment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/deployments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Deployment", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListRevisions": { + "requestType": "ListRevisionsRequest", + "responseType": "ListRevisionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/deployments/*}/revisions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/deployments/*}/revisions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRevision": { + "requestType": "GetRevisionRequest", + "responseType": "Revision", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/deployments/*/revisions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/deployments/*/revisions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetResource": { + "requestType": "GetResourceRequest", + "responseType": "Resource", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListResources": { + "requestType": "ListResourcesRequest", + "responseType": "ListResourcesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ExportDeploymentStatefile": { + "requestType": "ExportDeploymentStatefileRequest", + "responseType": "Statefile", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/deployments/*}:exportState", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/deployments/*}:exportState", + "body": "*" + } + } + ] + }, + "ExportRevisionStatefile": { + "requestType": "ExportRevisionStatefileRequest", + "responseType": "Statefile", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState", + "body": "*" + } + } + ] + }, + "ImportStatefile": { + "requestType": "ImportStatefileRequest", + "responseType": "Statefile", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/deployments/*}:importState", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,lock_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/deployments/*}:importState", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,lock_id" + } + ] + }, + "DeleteStatefile": { + "requestType": "DeleteStatefileRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/deployments/*}:deleteState", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/deployments/*}:deleteState", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "LockDeployment": { + "requestType": "LockDeploymentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/deployments/*}:lock", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "Deployment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/deployments/*}:lock", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Deployment", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UnlockDeployment": { + "requestType": "UnlockDeploymentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/deployments/*}:unlock", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,lock_id", + "(google.longrunning.operation_info).response_type": "Deployment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/deployments/*}:unlock", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,lock_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Deployment", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ExportLockInfo": { + "requestType": "ExportLockInfoRequest", + "responseType": "LockInfo", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/deployments/*}:exportLock", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/deployments/*}:exportLock" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreatePreview": { + "requestType": "CreatePreviewRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/previews", + "(google.api.http).body": "preview", + "(google.api.method_signature)": "parent,preview", + "(google.longrunning.operation_info).response_type": "Preview", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/previews", + "body": "preview" + } + }, + { + "(google.api.method_signature)": "parent,preview" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Preview", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetPreview": { + "requestType": "GetPreviewRequest", + "responseType": "Preview", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/previews/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/previews/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPreviews": { + "requestType": "ListPreviewsRequest", + "responseType": "ListPreviewsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/previews", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/previews" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeletePreview": { + "requestType": "DeletePreviewRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/previews/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "Preview", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/previews/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Preview", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ExportPreviewResult": { + "requestType": "ExportPreviewResultRequest", + "responseType": "ExportPreviewResultResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/previews/*}:export", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/previews/*}:export", + "body": "*" + } + } + ] + }, + "ListTerraformVersions": { + "requestType": "ListTerraformVersionsRequest", + "responseType": "ListTerraformVersionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/terraformVersions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/terraformVersions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetTerraformVersion": { + "requestType": "GetTerraformVersionRequest", + "responseType": "TerraformVersion", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/terraformVersions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/terraformVersions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListResourceChanges": { + "requestType": "ListResourceChangesRequest", + "responseType": "ListResourceChangesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceChanges", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceChanges" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetResourceChange": { + "requestType": "GetResourceChangeRequest", + "responseType": "ResourceChange", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/previews/*/resourceChanges/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/previews/*/resourceChanges/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListResourceDrifts": { + "requestType": "ListResourceDriftsRequest", + "responseType": "ListResourceDriftsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceDrifts", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceDrifts" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetResourceDrift": { + "requestType": "GetResourceDriftRequest", + "responseType": "ResourceDrift", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/previews/*/resourceDrifts/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/previews/*/resourceDrifts/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetAutoMigrationConfig": { + "requestType": "GetAutoMigrationConfigRequest", + "responseType": "AutoMigrationConfig", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/autoMigrationConfig}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/autoMigrationConfig}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateAutoMigrationConfig": { + "requestType": "UpdateAutoMigrationConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{auto_migration_config.name=projects/*/locations/*/autoMigrationConfig}", + "(google.api.http).body": "auto_migration_config", + "(google.api.method_signature)": "auto_migration_config,update_mask", + "(google.longrunning.operation_info).response_type": "AutoMigrationConfig", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{auto_migration_config.name=projects/*/locations/*/autoMigrationConfig}", + "body": "auto_migration_config" + } + }, + { + "(google.api.method_signature)": "auto_migration_config,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AutoMigrationConfig", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "QuotaValidation": { + "values": { + "QUOTA_VALIDATION_UNSPECIFIED": 0, + "ENABLED": 1, + "ENFORCED": 2 + } + }, + "Deployment": { + "options": { + "(google.api.resource).type": "config.googleapis.com/Deployment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/deployments/{deployment}" + }, + "oneofs": { + "blueprint": { + "oneof": [ + "terraformBlueprint" + ] + }, + "_artifactsGcsBucket": { + "oneof": [ + "artifactsGcsBucket" + ] + }, + "_serviceAccount": { + "oneof": [ + "serviceAccount" + ] + }, + "_importExistingResources": { + "oneof": [ + "importExistingResources" + ] + }, + "_workerPool": { + "oneof": [ + "workerPool" + ] + }, + "_tfVersionConstraint": { + "oneof": [ + "tfVersionConstraint" + ] + } + }, + "fields": { + "terraformBlueprint": { + "type": "TerraformBlueprint", + "id": 6 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "latestRevision": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetail": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "errorCode": { + "type": "ErrorCode", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteResults": { + "type": "ApplyResults", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteBuild": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteLogs": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "tfErrors": { + "rule": "repeated", + "type": "TerraformError", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "errorLogs": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "artifactsGcsBucket": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "serviceAccount": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount", + "proto3_optional": true + } + }, + "importExistingResources": { + "type": "bool", + "id": 17, + "options": { + "proto3_optional": true + } + }, + "workerPool": { + "type": "string", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool", + "proto3_optional": true + } + }, + "lockState": { + "type": "LockState", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "tfVersionConstraint": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "tfVersion": { + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "quotaValidation": { + "type": "QuotaValidation", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "providerConfig": { + "type": "ProviderConfig", + "id": 25, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "UPDATING": 3, + "DELETING": 4, + "FAILED": 5, + "SUSPENDED": 6, + "DELETED": 7 + } + }, + "ErrorCode": { + "values": { + "ERROR_CODE_UNSPECIFIED": 0, + "REVISION_FAILED": 1, + "CLOUD_BUILD_PERMISSION_DENIED": 3, + "DELETE_BUILD_API_FAILED": 5, + "DELETE_BUILD_RUN_FAILED": 6, + "BUCKET_CREATION_PERMISSION_DENIED": 7, + "BUCKET_CREATION_FAILED": 8, + "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": 10 + } + }, + "LockState": { + "values": { + "LOCK_STATE_UNSPECIFIED": 0, + "LOCKED": 1, + "UNLOCKED": 2, + "LOCKING": 3, + "UNLOCKING": 4, + "LOCK_FAILED": 5, + "UNLOCK_FAILED": 6 + } + } + } + }, + "TerraformBlueprint": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource", + "gitSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "string", + "id": 1 + }, + "gitSource": { + "type": "GitSource", + "id": 2 + }, + "inputValues": { + "keyType": "string", + "type": "TerraformVariable", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TerraformVariable": { + "fields": { + "inputValue": { + "type": "google.protobuf.Value", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ApplyResults": { + "fields": { + "content": { + "type": "string", + "id": 1 + }, + "artifacts": { + "type": "string", + "id": 2 + }, + "outputs": { + "keyType": "string", + "type": "TerraformOutput", + "id": 3 + } + } + }, + "TerraformOutput": { + "fields": { + "sensitive": { + "type": "bool", + "id": 1 + }, + "value": { + "type": "google.protobuf.Value", + "id": 2 + } + } + }, + "ListDeploymentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListDeploymentsResponse": { + "fields": { + "deployments": { + "rule": "repeated", + "type": "Deployment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Deployment" + } + } + } + }, + "ListRevisionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Deployment" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListRevisionsResponse": { + "fields": { + "revisions": { + "rule": "repeated", + "type": "Revision", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetRevisionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Revision" + } + } + } + }, + "CreateDeploymentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "deploymentId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "deployment": { + "type": "Deployment", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateDeploymentRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "deployment": { + "type": "Deployment", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Deployment" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "force": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "deletePolicy": { + "type": "DeletePolicy", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "DeletePolicy": { + "values": { + "DELETE_POLICY_UNSPECIFIED": 0, + "DELETE": 1, + "ABANDON": 2 + } + } + } + }, + "OperationMetadata": { + "oneofs": { + "resourceMetadata": { + "oneof": [ + "deploymentMetadata", + "previewMetadata" + ] + } + }, + "fields": { + "deploymentMetadata": { + "type": "DeploymentOperationMetadata", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "previewMetadata": { + "type": "PreviewOperationMetadata", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Revision": { + "options": { + "(google.api.resource).type": "config.googleapis.com/Revision", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}" + }, + "oneofs": { + "blueprint": { + "oneof": [ + "terraformBlueprint" + ] + } + }, + "fields": { + "terraformBlueprint": { + "type": "TerraformBlueprint", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "name": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "action": { + "type": "Action", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "applyResults": { + "type": "ApplyResults", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetail": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "errorCode": { + "type": "ErrorCode", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "build": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "logs": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "tfErrors": { + "rule": "repeated", + "type": "TerraformError", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "errorLogs": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" + } + }, + "importExistingResources": { + "type": "bool", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workerPool": { + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool" + } + }, + "tfVersionConstraint": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "tfVersion": { + "type": "string", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "quotaValidationResults": { + "type": "string", + "id": 29, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "quotaValidation": { + "type": "QuotaValidation", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "providerConfig": { + "type": "ProviderConfig", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "CREATE": 1, + "UPDATE": 2, + "DELETE": 3 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "APPLYING": 1, + "APPLIED": 2, + "FAILED": 3 + } + }, + "ErrorCode": { + "values": { + "ERROR_CODE_UNSPECIFIED": 0, + "CLOUD_BUILD_PERMISSION_DENIED": 1, + "APPLY_BUILD_API_FAILED": 4, + "APPLY_BUILD_RUN_FAILED": 5, + "QUOTA_VALIDATION_FAILED": 7, + "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": 8 + } + } + } + }, + "TerraformError": { + "fields": { + "resourceAddress": { + "type": "string", + "id": 1 + }, + "httpResponseCode": { + "type": "int32", + "id": 2 + }, + "errorDescription": { + "type": "string", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GitSource": { + "oneofs": { + "_repo": { + "oneof": [ + "repo" + ] + }, + "_directory": { + "oneof": [ + "directory" + ] + }, + "_ref": { + "oneof": [ + "ref" + ] + } + }, + "fields": { + "repo": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "directory": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ref": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DeploymentOperationMetadata": { + "fields": { + "step": { + "type": "DeploymentStep", + "id": 1 + }, + "applyResults": { + "type": "ApplyResults", + "id": 2 + }, + "build": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "logs": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "DeploymentStep": { + "values": { + "DEPLOYMENT_STEP_UNSPECIFIED": 0, + "PREPARING_STORAGE_BUCKET": 1, + "DOWNLOADING_BLUEPRINT": 2, + "RUNNING_TF_INIT": 3, + "RUNNING_TF_PLAN": 4, + "RUNNING_TF_APPLY": 5, + "RUNNING_TF_DESTROY": 6, + "RUNNING_TF_VALIDATE": 7, + "UNLOCKING_DEPLOYMENT": 8, + "SUCCEEDED": 9, + "FAILED": 10, + "VALIDATING_REPOSITORY": 11, + "RUNNING_QUOTA_VALIDATION": 12 + } + } + } + }, + "Resource": { + "options": { + "(google.api.resource).type": "config.googleapis.com/Resource", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "terraformInfo": { + "type": "ResourceTerraformInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "caiAssets": { + "keyType": "string", + "type": "ResourceCAIInfo", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "intent": { + "type": "Intent", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Intent": { + "values": { + "INTENT_UNSPECIFIED": 0, + "CREATE": 1, + "UPDATE": 2, + "DELETE": 3, + "RECREATE": 4, + "UNCHANGED": 5 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PLANNED": 1, + "IN_PROGRESS": 2, + "RECONCILED": 3, + "FAILED": 4 + } + } + } + }, + "ResourceTerraformInfo": { + "fields": { + "address": { + "type": "string", + "id": 1 + }, + "type": { + "type": "string", + "id": 2 + }, + "id": { + "type": "string", + "id": 3 + } + } + }, + "ResourceCAIInfo": { + "fields": { + "fullResourceName": { + "type": "string", + "id": 1 + } + } + }, + "GetResourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Resource" + } + } + } + }, + "ListResourcesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Revision" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListResourcesResponse": { + "fields": { + "resources": { + "rule": "repeated", + "type": "Resource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "Statefile": { + "fields": { + "signedUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ExportDeploymentStatefileRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Deployment" + } + }, + "draft": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ExportRevisionStatefileRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Revision" + } + } + } + }, + "ImportStatefileRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Deployment" + } + }, + "lockId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "skipDraft": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteStatefileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Deployment" + } + }, + "lockId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "LockDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Deployment" + } + } + } + }, + "UnlockDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Deployment" + } + }, + "lockId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExportLockInfoRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Deployment" + } + } + } + }, + "LockInfo": { + "fields": { + "lockId": { + "type": "int64", + "id": 1 + }, + "operation": { + "type": "string", + "id": 2 + }, + "info": { + "type": "string", + "id": 3 + }, + "who": { + "type": "string", + "id": 4 + }, + "version": { + "type": "string", + "id": 5 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + } + }, + "Preview": { + "options": { + "(google.api.resource).type": "config.googleapis.com/Preview", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/previews/{preview}", + "(google.api.resource).plural": "previews", + "(google.api.resource).singular": "preview" + }, + "oneofs": { + "blueprint": { + "oneof": [ + "terraformBlueprint" + ] + }, + "_artifactsGcsBucket": { + "oneof": [ + "artifactsGcsBucket" + ] + }, + "_workerPool": { + "oneof": [ + "workerPool" + ] + }, + "_tfVersionConstraint": { + "oneof": [ + "tfVersionConstraint" + ] + } + }, + "fields": { + "terraformBlueprint": { + "type": "TerraformBlueprint", + "id": 6 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deployment": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "config.googleapis.com/Deployment" + } + }, + "previewMode": { + "type": "PreviewMode", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "serviceAccount": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" + } + }, + "artifactsGcsBucket": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "workerPool": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool", + "proto3_optional": true + } + }, + "errorCode": { + "type": "ErrorCode", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "errorStatus": { + "type": "google.rpc.Status", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "build": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "tfErrors": { + "rule": "repeated", + "type": "TerraformError", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "errorLogs": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "previewArtifacts": { + "type": "PreviewArtifacts", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "logs": { + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "tfVersion": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "tfVersionConstraint": { + "type": "string", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "providerConfig": { + "type": "ProviderConfig", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "SUCCEEDED": 2, + "APPLYING": 3, + "STALE": 4, + "DELETING": 5, + "FAILED": 6, + "DELETED": 7 + } + }, + "PreviewMode": { + "values": { + "PREVIEW_MODE_UNSPECIFIED": 0, + "DEFAULT": 1, + "DELETE": 2 + } + }, + "ErrorCode": { + "values": { + "ERROR_CODE_UNSPECIFIED": 0, + "CLOUD_BUILD_PERMISSION_DENIED": 1, + "BUCKET_CREATION_PERMISSION_DENIED": 2, + "BUCKET_CREATION_FAILED": 3, + "DEPLOYMENT_LOCK_ACQUIRE_FAILED": 4, + "PREVIEW_BUILD_API_FAILED": 5, + "PREVIEW_BUILD_RUN_FAILED": 6, + "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": 7 + } + } + } + }, + "PreviewOperationMetadata": { + "fields": { + "step": { + "type": "PreviewStep", + "id": 1 + }, + "previewArtifacts": { + "type": "PreviewArtifacts", + "id": 2 + }, + "logs": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "build": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "PreviewStep": { + "values": { + "PREVIEW_STEP_UNSPECIFIED": 0, + "PREPARING_STORAGE_BUCKET": 1, + "DOWNLOADING_BLUEPRINT": 2, + "RUNNING_TF_INIT": 3, + "RUNNING_TF_PLAN": 4, + "FETCHING_DEPLOYMENT": 5, + "LOCKING_DEPLOYMENT": 6, + "UNLOCKING_DEPLOYMENT": 7, + "SUCCEEDED": 8, + "FAILED": 9, + "VALIDATING_REPOSITORY": 10 + } + } + } + }, + "PreviewArtifacts": { + "fields": { + "content": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "artifacts": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CreatePreviewRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "previewId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "preview": { + "type": "Preview", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetPreviewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Preview" + } + } + } + }, + "ListPreviewsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPreviewsResponse": { + "fields": { + "previews": { + "rule": "repeated", + "type": "Preview", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "DeletePreviewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Preview" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ExportPreviewResultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Preview" + } + } + } + }, + "ExportPreviewResultResponse": { + "fields": { + "result": { + "type": "PreviewResult", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "PreviewResult": { + "fields": { + "binarySignedUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "jsonSignedUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GetTerraformVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/TerraformVersion" + } + } + } + }, + "ListTerraformVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListTerraformVersionsResponse": { + "fields": { + "terraformVersions": { + "rule": "repeated", + "type": "TerraformVersion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "TerraformVersion": { + "options": { + "(google.api.resource).type": "config.googleapis.com/TerraformVersion", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/terraformVersions/{terraform_version}", + "(google.api.resource).plural": "terraformVersions", + "(google.api.resource).singular": "terraformVersion" + }, + "oneofs": { + "_deprecateTime": { + "oneof": [ + "deprecateTime" + ] + }, + "_obsoleteTime": { + "oneof": [ + "obsoleteTime" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "supportTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deprecateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "obsoleteTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "DEPRECATED": 2, + "OBSOLETE": 3 + } + } + } + }, + "ResourceChangeTerraformInfo": { + "fields": { + "address": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "provider": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "actions": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ResourceChange": { + "options": { + "(google.api.resource).type": "config.googleapis.com/ResourceChange", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}", + "(google.api.resource).plural": "resourceChanges", + "(google.api.resource).singular": "resourceChange" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "terraformInfo": { + "type": "ResourceChangeTerraformInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "intent": { + "type": "Intent", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "propertyChanges": { + "rule": "repeated", + "type": "PropertyChange", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Intent": { + "values": { + "INTENT_UNSPECIFIED": 0, + "CREATE": 1, + "UPDATE": 2, + "DELETE": 3, + "RECREATE": 4, + "UNCHANGED": 5 + } + } + } + }, + "PropertyChange": { + "fields": { + "path": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "beforeSensitivePaths": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "before": { + "type": "google.protobuf.Value", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "afterSensitivePaths": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "after": { + "type": "google.protobuf.Value", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListResourceChangesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Preview" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListResourceChangesResponse": { + "fields": { + "resourceChanges": { + "rule": "repeated", + "type": "ResourceChange", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetResourceChangeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/ResourceChange" + } + } + } + }, + "ResourceDriftTerraformInfo": { + "fields": { + "address": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "provider": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ResourceDrift": { + "options": { + "(google.api.resource).type": "config.googleapis.com/ResourceDrift", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}", + "(google.api.resource).plural": "resourceDrifts", + "(google.api.resource).singular": "resourceDrift" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "terraformInfo": { + "type": "ResourceDriftTerraformInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "propertyDrifts": { + "rule": "repeated", + "type": "PropertyDrift", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "PropertyDrift": { + "fields": { + "path": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "beforeSensitivePaths": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "before": { + "type": "google.protobuf.Value", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "afterSensitivePaths": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "after": { + "type": "google.protobuf.Value", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListResourceDriftsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Preview" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListResourceDriftsResponse": { + "fields": { + "resourceDrifts": { + "rule": "repeated", + "type": "ResourceDrift", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetResourceDriftRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/ResourceDrift" + } + } + } + }, + "ProviderConfig": { + "oneofs": { + "_sourceType": { + "oneof": [ + "sourceType" + ] + } + }, + "fields": { + "sourceType": { + "type": "ProviderSource", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "ProviderSource": { + "values": { + "PROVIDER_SOURCE_UNSPECIFIED": 0, + "SERVICE_MAINTAINED": 1 + } + } + } + }, + "GetAutoMigrationConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/AutoMigrationConfig" + } + } + } + }, + "AutoMigrationConfig": { + "options": { + "(google.api.resource).type": "config.googleapis.com/AutoMigrationConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/autoMigrationConfig", + "(google.api.resource).plural": "autoMigrationConfigs", + "(google.api.resource).singular": "autoMigrationConfig" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "autoMigrationEnabled": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateAutoMigrationConfigRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "autoMigrationConfig": { + "type": "AutoMigrationConfig", + "id": 2, + "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": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "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 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "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 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "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": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "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_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "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": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "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": { + "edition": "proto2", + "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 + } + }, + "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 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "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 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "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 + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "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 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_deployment.js new file mode 100644 index 00000000000..dd27af30fc1 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_deployment.js @@ -0,0 +1,88 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, deploymentId, deployment) { + // [START config_v1_generated_Config_CreateDeployment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the Deployment is created. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. + */ + // const parent = 'abc123' + /** + * Required. The Deployment ID. + */ + // const deploymentId = 'abc123' + /** + * Required. Deployment google.cloud.config.v1.Deployment resource to be + * created. + */ + // const deployment = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callCreateDeployment() { + // Construct request + const request = { + parent, + deploymentId, + deployment, + }; + + // Run request + const [operation] = await configClient.createDeployment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateDeployment(); + // [END config_v1_generated_Config_CreateDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_preview.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_preview.js new file mode 100644 index 00000000000..d5794baa2e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_preview.js @@ -0,0 +1,86 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, preview) { + // [START config_v1_generated_Config_CreatePreview_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the Preview is created. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. + */ + // const parent = 'abc123' + /** + * Optional. The preview ID. + */ + // const previewId = 'abc123' + /** + * Required. Preview google.cloud.config.v1.Preview resource to be created. + */ + // const preview = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callCreatePreview() { + // Construct request + const request = { + parent, + preview, + }; + + // Run request + const [operation] = await configClient.createPreview(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreatePreview(); + // [END config_v1_generated_Config_CreatePreview_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_deployment.js new file mode 100644 index 00000000000..84a517e7bde --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_deployment.js @@ -0,0 +1,89 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_DeleteDeployment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, any revisions for this deployment will also be + * deleted. (Otherwise, the request will only work if the deployment has no + * revisions.) + */ + // const force = true + /** + * Optional. Policy on how resources actuated by the deployment should be + * deleted. If unspecified, the default behavior is to delete the underlying + * resources. + */ + // const deletePolicy = {} + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callDeleteDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await configClient.deleteDeployment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteDeployment(); + // [END config_v1_generated_Config_DeleteDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_preview.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_preview.js new file mode 100644 index 00000000000..4e62f8376be --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_preview.js @@ -0,0 +1,77 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_DeletePreview_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Preview in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callDeletePreview() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await configClient.deletePreview(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeletePreview(); + // [END config_v1_generated_Config_DeletePreview_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_statefile.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_statefile.js new file mode 100644 index 00000000000..801f4b27f4b --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_statefile.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, lockId) { + // [START config_v1_generated_Config_DeleteStatefile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + */ + // const name = 'abc123' + /** + * Required. Lock ID of the lock file to verify that the user who is deleting + * the state file previously locked the Deployment. + */ + // const lockId = 1234 + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callDeleteStatefile() { + // Construct request + const request = { + name, + lockId, + }; + + // Run request + const response = await configClient.deleteStatefile(request); + console.log(response); + } + + callDeleteStatefile(); + // [END config_v1_generated_Config_DeleteStatefile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js new file mode 100644 index 00000000000..c010a9b1c04 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js @@ -0,0 +1,69 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START config_v1_generated_Config_ExportDeploymentStatefile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the statefile is listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + */ + // const parent = 'abc123' + /** + * Optional. If this flag is set to true, the exported deployment state file + * will be the draft state. This will enable the draft file to be validated + * before copying it over to the working state on unlock. + */ + // const draft = true + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callExportDeploymentStatefile() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await configClient.exportDeploymentStatefile(request); + console.log(response); + } + + callExportDeploymentStatefile(); + // [END config_v1_generated_Config_ExportDeploymentStatefile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_lock_info.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_lock_info.js new file mode 100644 index 00000000000..177d9e4cce6 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_lock_info.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_ExportLockInfo_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callExportLockInfo() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await configClient.exportLockInfo(request); + console.log(response); + } + + callExportLockInfo(); + // [END config_v1_generated_Config_ExportLockInfo_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_preview_result.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_preview_result.js new file mode 100644 index 00000000000..1b57cac143a --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_preview_result.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START config_v1_generated_Config_ExportPreviewResult_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The preview whose results should be exported. The preview value + * is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + */ + // const parent = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callExportPreviewResult() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await configClient.exportPreviewResult(request); + console.log(response); + } + + callExportPreviewResult(); + // [END config_v1_generated_Config_ExportPreviewResult_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js new file mode 100644 index 00000000000..d84fafc8b72 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START config_v1_generated_Config_ExportRevisionStatefile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the statefile is listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + */ + // const parent = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callExportRevisionStatefile() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await configClient.exportRevisionStatefile(request); + console.log(response); + } + + callExportRevisionStatefile(); + // [END config_v1_generated_Config_ExportRevisionStatefile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js new file mode 100644 index 00000000000..40ccce1fc2d --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_GetAutoMigrationConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the AutoMigrationConfig. + * Format: + * 'projects/{project_id}/locations/{location}/AutoMigrationConfig'. + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callGetAutoMigrationConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await configClient.getAutoMigrationConfig(request); + console.log(response); + } + + callGetAutoMigrationConfig(); + // [END config_v1_generated_Config_GetAutoMigrationConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_deployment.js new file mode 100644 index 00000000000..ee6136e7cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_deployment.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_GetDeployment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the deployment. Format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callGetDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await configClient.getDeployment(request); + console.log(response); + } + + callGetDeployment(); + // [END config_v1_generated_Config_GetDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_preview.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_preview.js new file mode 100644 index 00000000000..b09e7592be3 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_preview.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_GetPreview_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the preview. Format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callGetPreview() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await configClient.getPreview(request); + console.log(response); + } + + callGetPreview(); + // [END config_v1_generated_Config_GetPreview_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource.js new file mode 100644 index 00000000000..9bd42763798 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_GetResource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Resource in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callGetResource() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await configClient.getResource(request); + console.log(response); + } + + callGetResource(); + // [END config_v1_generated_Config_GetResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_change.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_change.js new file mode 100644 index 00000000000..6e0f19df635 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_change.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_GetResourceChange_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the resource change to retrieve. + * Format: + * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callGetResourceChange() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await configClient.getResourceChange(request); + console.log(response); + } + + callGetResourceChange(); + // [END config_v1_generated_Config_GetResourceChange_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_drift.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_drift.js new file mode 100644 index 00000000000..8c9ef3b5a9e --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_drift.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_GetResourceDrift_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the resource drift to retrieve. + * Format: + * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callGetResourceDrift() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await configClient.getResourceDrift(request); + console.log(response); + } + + callGetResourceDrift(); + // [END config_v1_generated_Config_GetResourceDrift_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_revision.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_revision.js new file mode 100644 index 00000000000..0e90690afe6 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_revision.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_GetRevision_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Revision in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callGetRevision() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await configClient.getRevision(request); + console.log(response); + } + + callGetRevision(); + // [END config_v1_generated_Config_GetRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_terraform_version.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_terraform_version.js new file mode 100644 index 00000000000..b8afed8589b --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_terraform_version.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_GetTerraformVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the TerraformVersion. Format: + * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}' + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callGetTerraformVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await configClient.getTerraformVersion(request); + console.log(response); + } + + callGetTerraformVersion(); + // [END config_v1_generated_Config_GetTerraformVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.import_statefile.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.import_statefile.js new file mode 100644 index 00000000000..cc21a501e90 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.import_statefile.js @@ -0,0 +1,73 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, lockId) { + // [START config_v1_generated_Config_ImportStatefile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the statefile is listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + */ + // const parent = 'abc123' + /** + * Required. Lock ID of the lock file to verify that the user who is importing + * the state file previously locked the Deployment. + */ + // const lockId = 1234 + /** + * Optional. + */ + // const skipDraft = true + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callImportStatefile() { + // Construct request + const request = { + parent, + lockId, + }; + + // Run request + const response = await configClient.importStatefile(request); + console.log(response); + } + + callImportStatefile(); + // [END config_v1_generated_Config_ImportStatefile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_deployments.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_deployments.js new file mode 100644 index 00000000000..110414edd52 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_deployments.js @@ -0,0 +1,101 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START config_v1_generated_Config_ListDeployments_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the Deployments are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}'. + */ + // const parent = 'abc123' + /** + * When requesting a page of resources, 'page_size' specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + */ + // const pageSize = 1234 + /** + * Token returned by previous call to 'ListDeployments' which specifies the + * position in the list from where to continue listing the resources. + */ + // const pageToken = 'abc123' + /** + * Lists the Deployments that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/bar + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * - Filter by state: + * - Deployments in CREATING state. + * state=CREATING + */ + // const filter = 'abc123' + /** + * Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callListDeployments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = configClient.listDeploymentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDeployments(); + // [END config_v1_generated_Config_ListDeployments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_previews.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_previews.js new file mode 100644 index 00000000000..5003a95b2e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_previews.js @@ -0,0 +1,101 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START config_v1_generated_Config_ListPreviews_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the Previews are listed. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a page of resources, 'page_size' specifies number + * of resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to 'ListDeployments' which + * specifies the position in the list from where to continue listing the + * resources. + */ + // const pageToken = 'abc123' + /** + * Optional. Lists the Deployments that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/bar + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * - Filter by state: + * - Deployments in CREATING state. + * state=CREATING + */ + // const filter = 'abc123' + /** + * Optional. Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callListPreviews() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = configClient.listPreviewsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPreviews(); + // [END config_v1_generated_Config_ListPreviews_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_changes.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_changes.js new file mode 100644 index 00000000000..7cbbfca0c85 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_changes.js @@ -0,0 +1,97 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START config_v1_generated_Config_ListResourceChanges_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the ResourceChanges are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a page of resource changes, 'page_size' specifies + * number of resource changes to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to 'ListResourceChanges' which + * specifies the position in the list from where to continue listing the + * resource changes. + */ + // const pageToken = 'abc123' + /** + * Optional. Lists the resource changes that match the filter expression. A + * filter expression filters the resource changes listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + */ + // const filter = 'abc123' + /** + * Optional. Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callListResourceChanges() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = configClient.listResourceChangesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListResourceChanges(); + // [END config_v1_generated_Config_ListResourceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js new file mode 100644 index 00000000000..7ace24aad25 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js @@ -0,0 +1,97 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START config_v1_generated_Config_ListResourceDrifts_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the ResourceDrifts are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a page of resource drifts, 'page_size' specifies + * number of resource drifts to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to 'ListResourceDrifts' which + * specifies the position in the list from where to continue listing the + * resource drifts. + */ + // const pageToken = 'abc123' + /** + * Optional. Lists the resource drifts that match the filter expression. A + * filter expression filters the resource drifts listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + */ + // const filter = 'abc123' + /** + * Optional. Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callListResourceDrifts() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = configClient.listResourceDriftsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListResourceDrifts(); + // [END config_v1_generated_Config_ListResourceDrifts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resources.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resources.js new file mode 100644 index 00000000000..c66734c42d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resources.js @@ -0,0 +1,95 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START config_v1_generated_Config_ListResources_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the Resources are listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + */ + // const parent = 'abc123' + /** + * When requesting a page of resources, 'page_size' specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + */ + // const pageSize = 1234 + /** + * Token returned by previous call to 'ListResources' which specifies the + * position in the list from where to continue listing the resources. + */ + // const pageToken = 'abc123' + /** + * Lists the Resources that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz + */ + // const filter = 'abc123' + /** + * Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callListResources() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = configClient.listResourcesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListResources(); + // [END config_v1_generated_Config_ListResources_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_revisions.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_revisions.js new file mode 100644 index 00000000000..34e18f6d4c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_revisions.js @@ -0,0 +1,101 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START config_v1_generated_Config_ListRevisions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the Revisions are listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + */ + // const parent = 'abc123' + /** + * When requesting a page of resources, `page_size` specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + */ + // const pageSize = 1234 + /** + * Token returned by previous call to 'ListRevisions' which specifies the + * position in the list from where to continue listing the resources. + */ + // const pageToken = 'abc123' + /** + * Lists the Revisions that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * - Filter by state: + * - Revisions in CREATING state. + * state=CREATING + */ + // const filter = 'abc123' + /** + * Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callListRevisions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = configClient.listRevisionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRevisions(); + // [END config_v1_generated_Config_ListRevisions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js new file mode 100644 index 00000000000..1f0d2b40a0f --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js @@ -0,0 +1,92 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START config_v1_generated_Config_ListTerraformVersions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent in whose context the TerraformVersions are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}'. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a page of terraform versions, 'page_size' + * specifies number of terraform versions to return. If unspecified, at most + * 500 will be returned. The maximum value is 1000. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to 'ListTerraformVersions' which + * specifies the position in the list from where to continue listing the + * terraform versions. + */ + // const pageToken = 'abc123' + /** + * Optional. Lists the TerraformVersions that match the filter expression. A + * filter expression filters the resources listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + */ + // const filter = 'abc123' + /** + * Optional. Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callListTerraformVersions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = configClient.listTerraformVersionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTerraformVersions(); + // [END config_v1_generated_Config_ListTerraformVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.lock_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.lock_deployment.js new file mode 100644 index 00000000000..1f8dabc4255 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.lock_deployment.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_LockDeployment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callLockDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await configClient.lockDeployment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callLockDeployment(); + // [END config_v1_generated_Config_LockDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.unlock_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.unlock_deployment.js new file mode 100644 index 00000000000..0a70fa290e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.unlock_deployment.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, lockId) { + // [START config_v1_generated_Config_UnlockDeployment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + */ + // const name = 'abc123' + /** + * Required. Lock ID of the lock file to be unlocked. + */ + // const lockId = 1234 + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callUnlockDeployment() { + // Construct request + const request = { + name, + lockId, + }; + + // Run request + const [operation] = await configClient.unlockDeployment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUnlockDeployment(); + // [END config_v1_generated_Config_UnlockDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js new file mode 100644 index 00000000000..469f0f8519d --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(autoMigrationConfig) { + // [START config_v1_generated_Config_UpdateAutoMigrationConfig_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. + */ + /** + * Optional. The update mask applies to the resource. See + * google.protobuf.FieldMask google.protobuf.FieldMask. + */ + // const updateMask = {} + /** + * Required. The AutoMigrationConfig to update. + */ + // const autoMigrationConfig = {} + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callUpdateAutoMigrationConfig() { + // Construct request + const request = { + autoMigrationConfig, + }; + + // Run request + const [operation] = await configClient.updateAutoMigrationConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAutoMigrationConfig(); + // [END config_v1_generated_Config_UpdateAutoMigrationConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_deployment.js new file mode 100644 index 00000000000..dacf8c07d91 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_deployment.js @@ -0,0 +1,87 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(deployment) { + // [START config_v1_generated_Config_UpdateDeployment_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. + */ + /** + * Optional. Field mask used to specify the fields to be overwritten in the + * Deployment resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. Deployment google.cloud.config.v1.Deployment to update. + * The deployment's `name` field is used to identify the resource to be + * updated. Format: + * `projects/{project}/locations/{location}/deployments/{deployment}` + */ + // const deployment = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callUpdateDeployment() { + // Construct request + const request = { + deployment, + }; + + // Run request + const [operation] = await configClient.updateDeployment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDeployment(); + // [END config_v1_generated_Config_UpdateDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json b/owl-bot-staging/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json new file mode 100644 index 00000000000..ab843bf1d64 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json @@ -0,0 +1,1359 @@ +{ + "clientLibrary": { + "name": "nodejs-config", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.config.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "config_v1_generated_Config_ListDeployments_async", + "title": "Config listDeployments Sample", + "origin": "API_DEFINITION", + "description": " Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.", + "canonical": true, + "file": "config.list_deployments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 93, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDeployments", + "fullName": "google.cloud.config.v1.Config.ListDeployments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ListDeploymentsResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ListDeployments", + "fullName": "google.cloud.config.v1.Config.ListDeployments", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_GetDeployment_async", + "title": "Config getDeployment Sample", + "origin": "API_DEFINITION", + "description": " Gets details about a [Deployment][google.cloud.config.v1.Deployment].", + "canonical": true, + "file": "config.get_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDeployment", + "fullName": "google.cloud.config.v1.Config.GetDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.Deployment", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "GetDeployment", + "fullName": "google.cloud.config.v1.Config.GetDeployment", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_CreateDeployment_async", + "title": "Config createDeployment Sample", + "origin": "API_DEFINITION", + "description": " Creates a [Deployment][google.cloud.config.v1.Deployment].", + "canonical": true, + "file": "config.create_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDeployment", + "fullName": "google.cloud.config.v1.Config.CreateDeployment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "deployment_id", + "type": "TYPE_STRING" + }, + { + "name": "deployment", + "type": ".google.cloud.config.v1.Deployment" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "CreateDeployment", + "fullName": "google.cloud.config.v1.Config.CreateDeployment", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_UpdateDeployment_async", + "title": "Config updateDeployment Sample", + "origin": "API_DEFINITION", + "description": " Updates a [Deployment][google.cloud.config.v1.Deployment].", + "canonical": true, + "file": "config.update_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDeployment", + "fullName": "google.cloud.config.v1.Config.UpdateDeployment", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "deployment", + "type": ".google.cloud.config.v1.Deployment" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "UpdateDeployment", + "fullName": "google.cloud.config.v1.Config.UpdateDeployment", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_DeleteDeployment_async", + "title": "Config deleteDeployment Sample", + "origin": "API_DEFINITION", + "description": " Deletes a [Deployment][google.cloud.config.v1.Deployment].", + "canonical": true, + "file": "config.delete_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDeployment", + "fullName": "google.cloud.config.v1.Config.DeleteDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + }, + { + "name": "delete_policy", + "type": ".google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "DeleteDeployment", + "fullName": "google.cloud.config.v1.Config.DeleteDeployment", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ListRevisions_async", + "title": "Config listRevisions Sample", + "origin": "API_DEFINITION", + "description": " Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.", + "canonical": true, + "file": "config.list_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 93, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRevisions", + "fullName": "google.cloud.config.v1.Config.ListRevisions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ListRevisionsResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ListRevisions", + "fullName": "google.cloud.config.v1.Config.ListRevisions", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_GetRevision_async", + "title": "Config getRevision Sample", + "origin": "API_DEFINITION", + "description": " Gets details about a [Revision][google.cloud.config.v1.Revision].", + "canonical": true, + "file": "config.get_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRevision", + "fullName": "google.cloud.config.v1.Config.GetRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.Revision", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "GetRevision", + "fullName": "google.cloud.config.v1.Config.GetRevision", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_GetResource_async", + "title": "Config getResource Sample", + "origin": "API_DEFINITION", + "description": " Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager.", + "canonical": true, + "file": "config.get_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetResource", + "fullName": "google.cloud.config.v1.Config.GetResource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.Resource", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "GetResource", + "fullName": "google.cloud.config.v1.Config.GetResource", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ListResources_async", + "title": "Config listResources Sample", + "origin": "API_DEFINITION", + "description": " Lists [Resources][google.cloud.config.v1.Resource] in a given revision.", + "canonical": true, + "file": "config.list_resources.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListResources", + "fullName": "google.cloud.config.v1.Config.ListResources", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ListResourcesResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ListResources", + "fullName": "google.cloud.config.v1.Config.ListResources", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ExportDeploymentStatefile_async", + "title": "Config exportDeploymentStatefile Sample", + "origin": "API_DEFINITION", + "description": " Exports Terraform state file from a given deployment.", + "canonical": true, + "file": "config.export_deployment_statefile.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExportDeploymentStatefile", + "fullName": "google.cloud.config.v1.Config.ExportDeploymentStatefile", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "draft", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.config.v1.Statefile", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ExportDeploymentStatefile", + "fullName": "google.cloud.config.v1.Config.ExportDeploymentStatefile", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ExportRevisionStatefile_async", + "title": "Config exportRevisionStatefile Sample", + "origin": "API_DEFINITION", + "description": " Exports Terraform state file from a given revision.", + "canonical": true, + "file": "config.export_revision_statefile.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExportRevisionStatefile", + "fullName": "google.cloud.config.v1.Config.ExportRevisionStatefile", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.Statefile", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ExportRevisionStatefile", + "fullName": "google.cloud.config.v1.Config.ExportRevisionStatefile", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ImportStatefile_async", + "title": "Config importStatefile Sample", + "origin": "API_DEFINITION", + "description": " Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.", + "canonical": true, + "file": "config.import_statefile.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportStatefile", + "fullName": "google.cloud.config.v1.Config.ImportStatefile", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "lock_id", + "type": "TYPE_INT64" + }, + { + "name": "skip_draft", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.config.v1.Statefile", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ImportStatefile", + "fullName": "google.cloud.config.v1.Config.ImportStatefile", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_DeleteStatefile_async", + "title": "Config deleteStatefile Sample", + "origin": "API_DEFINITION", + "description": " Deletes Terraform state file in a given deployment.", + "canonical": true, + "file": "config.delete_statefile.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteStatefile", + "fullName": "google.cloud.config.v1.Config.DeleteStatefile", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "lock_id", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "DeleteStatefile", + "fullName": "google.cloud.config.v1.Config.DeleteStatefile", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_LockDeployment_async", + "title": "Config lockDeployment Sample", + "origin": "API_DEFINITION", + "description": " Locks a deployment.", + "canonical": true, + "file": "config.lock_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "LockDeployment", + "fullName": "google.cloud.config.v1.Config.LockDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "LockDeployment", + "fullName": "google.cloud.config.v1.Config.LockDeployment", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_UnlockDeployment_async", + "title": "Config unlockDeployment Sample", + "origin": "API_DEFINITION", + "description": " Unlocks a locked deployment.", + "canonical": true, + "file": "config.unlock_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UnlockDeployment", + "fullName": "google.cloud.config.v1.Config.UnlockDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "lock_id", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "UnlockDeployment", + "fullName": "google.cloud.config.v1.Config.UnlockDeployment", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ExportLockInfo_async", + "title": "Config exportLockInfo Sample", + "origin": "API_DEFINITION", + "description": " Exports the lock info on a locked deployment.", + "canonical": true, + "file": "config.export_lock_info.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExportLockInfo", + "fullName": "google.cloud.config.v1.Config.ExportLockInfo", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.LockInfo", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ExportLockInfo", + "fullName": "google.cloud.config.v1.Config.ExportLockInfo", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_CreatePreview_async", + "title": "Config createPreview Sample", + "origin": "API_DEFINITION", + "description": " Creates a [Preview][google.cloud.config.v1.Preview].", + "canonical": true, + "file": "config.create_preview.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePreview", + "fullName": "google.cloud.config.v1.Config.CreatePreview", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "preview_id", + "type": "TYPE_STRING" + }, + { + "name": "preview", + "type": ".google.cloud.config.v1.Preview" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "CreatePreview", + "fullName": "google.cloud.config.v1.Config.CreatePreview", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_GetPreview_async", + "title": "Config getPreview Sample", + "origin": "API_DEFINITION", + "description": " Gets details about a [Preview][google.cloud.config.v1.Preview].", + "canonical": true, + "file": "config.get_preview.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPreview", + "fullName": "google.cloud.config.v1.Config.GetPreview", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.Preview", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "GetPreview", + "fullName": "google.cloud.config.v1.Config.GetPreview", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ListPreviews_async", + "title": "Config listPreviews Sample", + "origin": "API_DEFINITION", + "description": " Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.", + "canonical": true, + "file": "config.list_previews.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 93, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPreviews", + "fullName": "google.cloud.config.v1.Config.ListPreviews", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ListPreviewsResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ListPreviews", + "fullName": "google.cloud.config.v1.Config.ListPreviews", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_DeletePreview_async", + "title": "Config deletePreview Sample", + "origin": "API_DEFINITION", + "description": " Deletes a [Preview][google.cloud.config.v1.Preview].", + "canonical": true, + "file": "config.delete_preview.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePreview", + "fullName": "google.cloud.config.v1.Config.DeletePreview", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "DeletePreview", + "fullName": "google.cloud.config.v1.Config.DeletePreview", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ExportPreviewResult_async", + "title": "Config exportPreviewResult Sample", + "origin": "API_DEFINITION", + "description": " Export [Preview][google.cloud.config.v1.Preview] results.", + "canonical": true, + "file": "config.export_preview_result.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExportPreviewResult", + "fullName": "google.cloud.config.v1.Config.ExportPreviewResult", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ExportPreviewResultResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ExportPreviewResult", + "fullName": "google.cloud.config.v1.Config.ExportPreviewResult", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ListTerraformVersions_async", + "title": "Config listTerraformVersions Sample", + "origin": "API_DEFINITION", + "description": " Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.", + "canonical": true, + "file": "config.list_terraform_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTerraformVersions", + "fullName": "google.cloud.config.v1.Config.ListTerraformVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ListTerraformVersionsResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ListTerraformVersions", + "fullName": "google.cloud.config.v1.Config.ListTerraformVersions", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_GetTerraformVersion_async", + "title": "Config getTerraformVersion Sample", + "origin": "API_DEFINITION", + "description": " Gets details about a [TerraformVersion][google.cloud.config.v1.TerraformVersion].", + "canonical": true, + "file": "config.get_terraform_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTerraformVersion", + "fullName": "google.cloud.config.v1.Config.GetTerraformVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.TerraformVersion", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "GetTerraformVersion", + "fullName": "google.cloud.config.v1.Config.GetTerraformVersion", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ListResourceChanges_async", + "title": "Config listResourceChanges Sample", + "origin": "API_DEFINITION", + "description": " Lists ResourceChanges for a given preview.", + "canonical": true, + "file": "config.list_resource_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListResourceChanges", + "fullName": "google.cloud.config.v1.Config.ListResourceChanges", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ListResourceChangesResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ListResourceChanges", + "fullName": "google.cloud.config.v1.Config.ListResourceChanges", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_GetResourceChange_async", + "title": "Config getResourceChange Sample", + "origin": "API_DEFINITION", + "description": " Get a ResourceChange for a given preview.", + "canonical": true, + "file": "config.get_resource_change.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetResourceChange", + "fullName": "google.cloud.config.v1.Config.GetResourceChange", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ResourceChange", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "GetResourceChange", + "fullName": "google.cloud.config.v1.Config.GetResourceChange", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ListResourceDrifts_async", + "title": "Config listResourceDrifts Sample", + "origin": "API_DEFINITION", + "description": " List ResourceDrifts for a given preview.", + "canonical": true, + "file": "config.list_resource_drifts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListResourceDrifts", + "fullName": "google.cloud.config.v1.Config.ListResourceDrifts", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ListResourceDriftsResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ListResourceDrifts", + "fullName": "google.cloud.config.v1.Config.ListResourceDrifts", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_GetResourceDrift_async", + "title": "Config getResourceDrift Sample", + "origin": "API_DEFINITION", + "description": " Get a ResourceDrift for a given preview.", + "canonical": true, + "file": "config.get_resource_drift.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetResourceDrift", + "fullName": "google.cloud.config.v1.Config.GetResourceDrift", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ResourceDrift", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "GetResourceDrift", + "fullName": "google.cloud.config.v1.Config.GetResourceDrift", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_GetAutoMigrationConfig_async", + "title": "Config getAutoMigrationConfig Sample", + "origin": "API_DEFINITION", + "description": " Get the AutoMigrationConfig for a given project and location.", + "canonical": true, + "file": "config.get_auto_migration_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAutoMigrationConfig", + "fullName": "google.cloud.config.v1.Config.GetAutoMigrationConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.AutoMigrationConfig", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "GetAutoMigrationConfig", + "fullName": "google.cloud.config.v1.Config.GetAutoMigrationConfig", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_UpdateAutoMigrationConfig_async", + "title": "Config updateAutoMigrationConfig Sample", + "origin": "API_DEFINITION", + "description": " Updates the AutoMigrationConfig for a given project and location.", + "canonical": true, + "file": "config.update_auto_migration_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAutoMigrationConfig", + "fullName": "google.cloud.config.v1.Config.UpdateAutoMigrationConfig", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "auto_migration_config", + "type": ".google.cloud.config.v1.AutoMigrationConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "UpdateAutoMigrationConfig", + "fullName": "google.cloud.config.v1.Config.UpdateAutoMigrationConfig", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-config/src/index.ts b/owl-bot-staging/google-cloud-config/src/index.ts new file mode 100644 index 00000000000..e74be450ee7 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const ConfigClient = v1.ConfigClient; +type ConfigClient = v1.ConfigClient; + +export {v1, ConfigClient}; +export default {v1, ConfigClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/owl-bot-staging/google-cloud-config/src/v1/config_client.ts b/owl-bot-staging/google-cloud-config/src/v1/config_client.ts new file mode 100644 index 00000000000..db62f4c8f86 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/src/v1/config_client.ts @@ -0,0 +1,5673 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, IamClient, IamProtos, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/config_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './config_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Infrastructure Manager is a managed service that automates the deployment and + * management of Google Cloud infrastructure resources. + * @class + * @memberof v1 + */ +export class ConfigClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('config'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + configStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ConfigClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * 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 ConfigClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ConfigClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'config.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + 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 ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + autoMigrationConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/autoMigrationConfig' + ), + deploymentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deployments/{deployment}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + previewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/previews/{preview}' + ), + resourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}' + ), + resourceChangePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}' + ), + resourceDriftPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}' + ), + revisionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}' + ), + serviceAccountPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/serviceAccounts/{service_account}' + ), + terraformVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/terraformVersions/{terraform_version}' + ), + workerPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workerPools/{worker_pool}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listDeployments: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'deployments'), + listRevisions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'revisions'), + listResources: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources'), + listPreviews: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'previews'), + listTerraformVersions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'terraformVersions'), + listResourceChanges: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resourceChanges'), + listResourceDrifts: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resourceDrifts') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/deployments/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/deployments/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/deployments/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createDeploymentResponse = protoFilesRoot.lookup( + '.google.cloud.config.v1.Deployment') as gax.protobuf.Type; + const createDeploymentMetadata = protoFilesRoot.lookup( + '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; + const updateDeploymentResponse = protoFilesRoot.lookup( + '.google.cloud.config.v1.Deployment') as gax.protobuf.Type; + const updateDeploymentMetadata = protoFilesRoot.lookup( + '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; + const deleteDeploymentResponse = protoFilesRoot.lookup( + '.google.cloud.config.v1.Deployment') as gax.protobuf.Type; + const deleteDeploymentMetadata = protoFilesRoot.lookup( + '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; + const lockDeploymentResponse = protoFilesRoot.lookup( + '.google.cloud.config.v1.Deployment') as gax.protobuf.Type; + const lockDeploymentMetadata = protoFilesRoot.lookup( + '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; + const unlockDeploymentResponse = protoFilesRoot.lookup( + '.google.cloud.config.v1.Deployment') as gax.protobuf.Type; + const unlockDeploymentMetadata = protoFilesRoot.lookup( + '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; + const createPreviewResponse = protoFilesRoot.lookup( + '.google.cloud.config.v1.Preview') as gax.protobuf.Type; + const createPreviewMetadata = protoFilesRoot.lookup( + '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; + const deletePreviewResponse = protoFilesRoot.lookup( + '.google.cloud.config.v1.Preview') as gax.protobuf.Type; + const deletePreviewMetadata = protoFilesRoot.lookup( + '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; + const updateAutoMigrationConfigResponse = protoFilesRoot.lookup( + '.google.cloud.config.v1.AutoMigrationConfig') as gax.protobuf.Type; + const updateAutoMigrationConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createDeployment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createDeploymentResponse.decode.bind(createDeploymentResponse), + createDeploymentMetadata.decode.bind(createDeploymentMetadata)), + updateDeployment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDeploymentResponse.decode.bind(updateDeploymentResponse), + updateDeploymentMetadata.decode.bind(updateDeploymentMetadata)), + deleteDeployment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDeploymentResponse.decode.bind(deleteDeploymentResponse), + deleteDeploymentMetadata.decode.bind(deleteDeploymentMetadata)), + lockDeployment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + lockDeploymentResponse.decode.bind(lockDeploymentResponse), + lockDeploymentMetadata.decode.bind(lockDeploymentMetadata)), + unlockDeployment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + unlockDeploymentResponse.decode.bind(unlockDeploymentResponse), + unlockDeploymentMetadata.decode.bind(unlockDeploymentMetadata)), + createPreview: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createPreviewResponse.decode.bind(createPreviewResponse), + createPreviewMetadata.decode.bind(createPreviewMetadata)), + deletePreview: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deletePreviewResponse.decode.bind(deletePreviewResponse), + deletePreviewMetadata.decode.bind(deletePreviewMetadata)), + updateAutoMigrationConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAutoMigrationConfigResponse.decode.bind(updateAutoMigrationConfigResponse), + updateAutoMigrationConfigMetadata.decode.bind(updateAutoMigrationConfigMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.config.v1.Config', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.configStub) { + return this.configStub; + } + + // Put together the "service stub" for + // google.cloud.config.v1.Config. + this.configStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.config.v1.Config') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.config.v1.Config, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const configStubMethods = + ['listDeployments', 'getDeployment', 'createDeployment', 'updateDeployment', 'deleteDeployment', 'listRevisions', 'getRevision', 'getResource', 'listResources', 'exportDeploymentStatefile', 'exportRevisionStatefile', 'importStatefile', 'deleteStatefile', 'lockDeployment', 'unlockDeployment', 'exportLockInfo', 'createPreview', 'getPreview', 'listPreviews', 'deletePreview', 'exportPreviewResult', 'listTerraformVersions', 'getTerraformVersion', 'listResourceChanges', 'getResourceChange', 'listResourceDrifts', 'getResourceDrift', 'getAutoMigrationConfig', 'updateAutoMigrationConfig']; + for (const methodName of configStubMethods) { + const callPromise = this.configStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.configStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'config.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'config.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Gets details about a {@link protos.google.cloud.config.v1.Deployment|Deployment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the deployment. Format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Deployment|Deployment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.get_deployment.js + * region_tag:config_v1_generated_Config_GetDeployment_async + */ + getDeployment( + request?: protos.google.cloud.config.v1.IGetDeploymentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IDeployment, + protos.google.cloud.config.v1.IGetDeploymentRequest|undefined, {}|undefined + ]>; + getDeployment( + request: protos.google.cloud.config.v1.IGetDeploymentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IDeployment, + protos.google.cloud.config.v1.IGetDeploymentRequest|null|undefined, + {}|null|undefined>): void; + getDeployment( + request: protos.google.cloud.config.v1.IGetDeploymentRequest, + callback: Callback< + protos.google.cloud.config.v1.IDeployment, + protos.google.cloud.config.v1.IGetDeploymentRequest|null|undefined, + {}|null|undefined>): void; + getDeployment( + request?: protos.google.cloud.config.v1.IGetDeploymentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IDeployment, + protos.google.cloud.config.v1.IGetDeploymentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IDeployment, + protos.google.cloud.config.v1.IGetDeploymentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IDeployment, + protos.google.cloud.config.v1.IGetDeploymentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getDeployment request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IDeployment, + protos.google.cloud.config.v1.IGetDeploymentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDeployment response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getDeployment(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IDeployment, + protos.google.cloud.config.v1.IGetDeploymentRequest|undefined, + {}|undefined + ]) => { + this._log.info('getDeployment response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets details about a {@link protos.google.cloud.config.v1.Revision|Revision}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Revision in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Revision|Revision}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.get_revision.js + * region_tag:config_v1_generated_Config_GetRevision_async + */ + getRevision( + request?: protos.google.cloud.config.v1.IGetRevisionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IRevision, + protos.google.cloud.config.v1.IGetRevisionRequest|undefined, {}|undefined + ]>; + getRevision( + request: protos.google.cloud.config.v1.IGetRevisionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IRevision, + protos.google.cloud.config.v1.IGetRevisionRequest|null|undefined, + {}|null|undefined>): void; + getRevision( + request: protos.google.cloud.config.v1.IGetRevisionRequest, + callback: Callback< + protos.google.cloud.config.v1.IRevision, + protos.google.cloud.config.v1.IGetRevisionRequest|null|undefined, + {}|null|undefined>): void; + getRevision( + request?: protos.google.cloud.config.v1.IGetRevisionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IRevision, + protos.google.cloud.config.v1.IGetRevisionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IRevision, + protos.google.cloud.config.v1.IGetRevisionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IRevision, + protos.google.cloud.config.v1.IGetRevisionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getRevision request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IRevision, + protos.google.cloud.config.v1.IGetRevisionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getRevision response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getRevision(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IRevision, + protos.google.cloud.config.v1.IGetRevisionRequest|undefined, + {}|undefined + ]) => { + this._log.info('getRevision response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets details about a {@link protos.google.cloud.config.v1.Resource|Resource} deployed + * by Infra Manager. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Resource in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Resource|Resource}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.get_resource.js + * region_tag:config_v1_generated_Config_GetResource_async + */ + getResource( + request?: protos.google.cloud.config.v1.IGetResourceRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IResource, + protos.google.cloud.config.v1.IGetResourceRequest|undefined, {}|undefined + ]>; + getResource( + request: protos.google.cloud.config.v1.IGetResourceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IResource, + protos.google.cloud.config.v1.IGetResourceRequest|null|undefined, + {}|null|undefined>): void; + getResource( + request: protos.google.cloud.config.v1.IGetResourceRequest, + callback: Callback< + protos.google.cloud.config.v1.IResource, + protos.google.cloud.config.v1.IGetResourceRequest|null|undefined, + {}|null|undefined>): void; + getResource( + request?: protos.google.cloud.config.v1.IGetResourceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IResource, + protos.google.cloud.config.v1.IGetResourceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IResource, + protos.google.cloud.config.v1.IGetResourceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IResource, + protos.google.cloud.config.v1.IGetResourceRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getResource request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IResource, + protos.google.cloud.config.v1.IGetResourceRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getResource response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getResource(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IResource, + protos.google.cloud.config.v1.IGetResourceRequest|undefined, + {}|undefined + ]) => { + this._log.info('getResource response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Exports Terraform state file from a given deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the statefile is listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param {boolean} [request.draft] + * Optional. If this flag is set to true, the exported deployment state file + * will be the draft state. This will enable the draft file to be validated + * before copying it over to the working state on unlock. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Statefile|Statefile}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.export_deployment_statefile.js + * region_tag:config_v1_generated_Config_ExportDeploymentStatefile_async + */ + exportDeploymentStatefile( + request?: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|undefined, {}|undefined + ]>; + exportDeploymentStatefile( + request: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|null|undefined, + {}|null|undefined>): void; + exportDeploymentStatefile( + request: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, + callback: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|null|undefined, + {}|null|undefined>): void; + exportDeploymentStatefile( + request?: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('exportDeploymentStatefile request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('exportDeploymentStatefile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.exportDeploymentStatefile(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|undefined, + {}|undefined + ]) => { + this._log.info('exportDeploymentStatefile response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Exports Terraform state file from a given revision. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the statefile is listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Statefile|Statefile}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.export_revision_statefile.js + * region_tag:config_v1_generated_Config_ExportRevisionStatefile_async + */ + exportRevisionStatefile( + request?: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportRevisionStatefileRequest|undefined, {}|undefined + ]>; + exportRevisionStatefile( + request: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportRevisionStatefileRequest|null|undefined, + {}|null|undefined>): void; + exportRevisionStatefile( + request: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, + callback: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportRevisionStatefileRequest|null|undefined, + {}|null|undefined>): void; + exportRevisionStatefile( + request?: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportRevisionStatefileRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportRevisionStatefileRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportRevisionStatefileRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('exportRevisionStatefile request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportRevisionStatefileRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('exportRevisionStatefile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.exportRevisionStatefile(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IExportRevisionStatefileRequest|undefined, + {}|undefined + ]) => { + this._log.info('exportRevisionStatefile response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Imports Terraform state file in a given deployment. The state file does not + * take effect until the Deployment has been unlocked. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the statefile is listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param {number} request.lockId + * Required. Lock ID of the lock file to verify that the user who is importing + * the state file previously locked the Deployment. + * @param {boolean} [request.skipDraft] + * Optional. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Statefile|Statefile}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.import_statefile.js + * region_tag:config_v1_generated_Config_ImportStatefile_async + */ + importStatefile( + request?: protos.google.cloud.config.v1.IImportStatefileRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IImportStatefileRequest|undefined, {}|undefined + ]>; + importStatefile( + request: protos.google.cloud.config.v1.IImportStatefileRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IImportStatefileRequest|null|undefined, + {}|null|undefined>): void; + importStatefile( + request: protos.google.cloud.config.v1.IImportStatefileRequest, + callback: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IImportStatefileRequest|null|undefined, + {}|null|undefined>): void; + importStatefile( + request?: protos.google.cloud.config.v1.IImportStatefileRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IImportStatefileRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IImportStatefileRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IImportStatefileRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('importStatefile request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IImportStatefileRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('importStatefile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.importStatefile(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IStatefile, + protos.google.cloud.config.v1.IImportStatefileRequest|undefined, + {}|undefined + ]) => { + this._log.info('importStatefile response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes Terraform state file in a given deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param {number} request.lockId + * Required. Lock ID of the lock file to verify that the user who is deleting + * the state file previously locked the Deployment. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.delete_statefile.js + * region_tag:config_v1_generated_Config_DeleteStatefile_async + */ + deleteStatefile( + request?: protos.google.cloud.config.v1.IDeleteStatefileRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.config.v1.IDeleteStatefileRequest|undefined, {}|undefined + ]>; + deleteStatefile( + request: protos.google.cloud.config.v1.IDeleteStatefileRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.config.v1.IDeleteStatefileRequest|null|undefined, + {}|null|undefined>): void; + deleteStatefile( + request: protos.google.cloud.config.v1.IDeleteStatefileRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.config.v1.IDeleteStatefileRequest|null|undefined, + {}|null|undefined>): void; + deleteStatefile( + request?: protos.google.cloud.config.v1.IDeleteStatefileRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.config.v1.IDeleteStatefileRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.config.v1.IDeleteStatefileRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.config.v1.IDeleteStatefileRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteStatefile request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.config.v1.IDeleteStatefileRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteStatefile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteStatefile(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.config.v1.IDeleteStatefileRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteStatefile response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Exports the lock info on a locked deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.LockInfo|LockInfo}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.export_lock_info.js + * region_tag:config_v1_generated_Config_ExportLockInfo_async + */ + exportLockInfo( + request?: protos.google.cloud.config.v1.IExportLockInfoRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.ILockInfo, + protos.google.cloud.config.v1.IExportLockInfoRequest|undefined, {}|undefined + ]>; + exportLockInfo( + request: protos.google.cloud.config.v1.IExportLockInfoRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.ILockInfo, + protos.google.cloud.config.v1.IExportLockInfoRequest|null|undefined, + {}|null|undefined>): void; + exportLockInfo( + request: protos.google.cloud.config.v1.IExportLockInfoRequest, + callback: Callback< + protos.google.cloud.config.v1.ILockInfo, + protos.google.cloud.config.v1.IExportLockInfoRequest|null|undefined, + {}|null|undefined>): void; + exportLockInfo( + request?: protos.google.cloud.config.v1.IExportLockInfoRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.ILockInfo, + protos.google.cloud.config.v1.IExportLockInfoRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.ILockInfo, + protos.google.cloud.config.v1.IExportLockInfoRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.ILockInfo, + protos.google.cloud.config.v1.IExportLockInfoRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('exportLockInfo request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.ILockInfo, + protos.google.cloud.config.v1.IExportLockInfoRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('exportLockInfo response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.exportLockInfo(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.ILockInfo, + protos.google.cloud.config.v1.IExportLockInfoRequest|undefined, + {}|undefined + ]) => { + this._log.info('exportLockInfo response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets details about a {@link protos.google.cloud.config.v1.Preview|Preview}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the preview. Format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Preview|Preview}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.get_preview.js + * region_tag:config_v1_generated_Config_GetPreview_async + */ + getPreview( + request?: protos.google.cloud.config.v1.IGetPreviewRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IPreview, + protos.google.cloud.config.v1.IGetPreviewRequest|undefined, {}|undefined + ]>; + getPreview( + request: protos.google.cloud.config.v1.IGetPreviewRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IPreview, + protos.google.cloud.config.v1.IGetPreviewRequest|null|undefined, + {}|null|undefined>): void; + getPreview( + request: protos.google.cloud.config.v1.IGetPreviewRequest, + callback: Callback< + protos.google.cloud.config.v1.IPreview, + protos.google.cloud.config.v1.IGetPreviewRequest|null|undefined, + {}|null|undefined>): void; + getPreview( + request?: protos.google.cloud.config.v1.IGetPreviewRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IPreview, + protos.google.cloud.config.v1.IGetPreviewRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IPreview, + protos.google.cloud.config.v1.IGetPreviewRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IPreview, + protos.google.cloud.config.v1.IGetPreviewRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getPreview request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IPreview, + protos.google.cloud.config.v1.IGetPreviewRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getPreview response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getPreview(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IPreview, + protos.google.cloud.config.v1.IGetPreviewRequest|undefined, + {}|undefined + ]) => { + this._log.info('getPreview response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Export {@link protos.google.cloud.config.v1.Preview|Preview} results. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The preview whose results should be exported. The preview value + * is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.ExportPreviewResultResponse|ExportPreviewResultResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.export_preview_result.js + * region_tag:config_v1_generated_Config_ExportPreviewResult_async + */ + exportPreviewResult( + request?: protos.google.cloud.config.v1.IExportPreviewResultRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IExportPreviewResultResponse, + protos.google.cloud.config.v1.IExportPreviewResultRequest|undefined, {}|undefined + ]>; + exportPreviewResult( + request: protos.google.cloud.config.v1.IExportPreviewResultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IExportPreviewResultResponse, + protos.google.cloud.config.v1.IExportPreviewResultRequest|null|undefined, + {}|null|undefined>): void; + exportPreviewResult( + request: protos.google.cloud.config.v1.IExportPreviewResultRequest, + callback: Callback< + protos.google.cloud.config.v1.IExportPreviewResultResponse, + protos.google.cloud.config.v1.IExportPreviewResultRequest|null|undefined, + {}|null|undefined>): void; + exportPreviewResult( + request?: protos.google.cloud.config.v1.IExportPreviewResultRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IExportPreviewResultResponse, + protos.google.cloud.config.v1.IExportPreviewResultRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IExportPreviewResultResponse, + protos.google.cloud.config.v1.IExportPreviewResultRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IExportPreviewResultResponse, + protos.google.cloud.config.v1.IExportPreviewResultRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('exportPreviewResult request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IExportPreviewResultResponse, + protos.google.cloud.config.v1.IExportPreviewResultRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('exportPreviewResult response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.exportPreviewResult(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IExportPreviewResultResponse, + protos.google.cloud.config.v1.IExportPreviewResultRequest|undefined, + {}|undefined + ]) => { + this._log.info('exportPreviewResult response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets details about a + * {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the TerraformVersion. Format: + * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}' + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.get_terraform_version.js + * region_tag:config_v1_generated_Config_GetTerraformVersion_async + */ + getTerraformVersion( + request?: protos.google.cloud.config.v1.IGetTerraformVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.ITerraformVersion, + protos.google.cloud.config.v1.IGetTerraformVersionRequest|undefined, {}|undefined + ]>; + getTerraformVersion( + request: protos.google.cloud.config.v1.IGetTerraformVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.ITerraformVersion, + protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined, + {}|null|undefined>): void; + getTerraformVersion( + request: protos.google.cloud.config.v1.IGetTerraformVersionRequest, + callback: Callback< + protos.google.cloud.config.v1.ITerraformVersion, + protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined, + {}|null|undefined>): void; + getTerraformVersion( + request?: protos.google.cloud.config.v1.IGetTerraformVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.ITerraformVersion, + protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.ITerraformVersion, + protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.ITerraformVersion, + protos.google.cloud.config.v1.IGetTerraformVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getTerraformVersion request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.ITerraformVersion, + protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getTerraformVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getTerraformVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.ITerraformVersion, + protos.google.cloud.config.v1.IGetTerraformVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('getTerraformVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get a ResourceChange for a given preview. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the resource change to retrieve. + * Format: + * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.ResourceChange|ResourceChange}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.get_resource_change.js + * region_tag:config_v1_generated_Config_GetResourceChange_async + */ + getResourceChange( + request?: protos.google.cloud.config.v1.IGetResourceChangeRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|undefined, {}|undefined + ]>; + getResourceChange( + request: protos.google.cloud.config.v1.IGetResourceChangeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, + {}|null|undefined>): void; + getResourceChange( + request: protos.google.cloud.config.v1.IGetResourceChangeRequest, + callback: Callback< + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, + {}|null|undefined>): void; + getResourceChange( + request?: protos.google.cloud.config.v1.IGetResourceChangeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getResourceChange request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getResourceChange response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getResourceChange(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|undefined, + {}|undefined + ]) => { + this._log.info('getResourceChange response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get a ResourceDrift for a given preview. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the resource drift to retrieve. + * Format: + * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.ResourceDrift|ResourceDrift}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.get_resource_drift.js + * region_tag:config_v1_generated_Config_GetResourceDrift_async + */ + getResourceDrift( + request?: protos.google.cloud.config.v1.IGetResourceDriftRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|undefined, {}|undefined + ]>; + getResourceDrift( + request: protos.google.cloud.config.v1.IGetResourceDriftRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, + {}|null|undefined>): void; + getResourceDrift( + request: protos.google.cloud.config.v1.IGetResourceDriftRequest, + callback: Callback< + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, + {}|null|undefined>): void; + getResourceDrift( + request?: protos.google.cloud.config.v1.IGetResourceDriftRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getResourceDrift request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getResourceDrift response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getResourceDrift(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|undefined, + {}|undefined + ]) => { + this._log.info('getResourceDrift response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get the AutoMigrationConfig for a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the AutoMigrationConfig. + * Format: + * 'projects/{project_id}/locations/{location}/AutoMigrationConfig'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.AutoMigrationConfig|AutoMigrationConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.get_auto_migration_config.js + * region_tag:config_v1_generated_Config_GetAutoMigrationConfig_async + */ + getAutoMigrationConfig( + request?: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|undefined, {}|undefined + ]>; + getAutoMigrationConfig( + request: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, + {}|null|undefined>): void; + getAutoMigrationConfig( + request: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, + callback: Callback< + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, + {}|null|undefined>): void; + getAutoMigrationConfig( + request?: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getAutoMigrationConfig request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAutoMigrationConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getAutoMigrationConfig(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|undefined, + {}|undefined + ]) => { + this._log.info('getAutoMigrationConfig response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates a {@link protos.google.cloud.config.v1.Deployment|Deployment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Deployment is created. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. + * @param {string} request.deploymentId + * Required. The Deployment ID. + * @param {google.cloud.config.v1.Deployment} request.deployment + * Required. {@link protos.google.cloud.config.v1.Deployment|Deployment} resource to be + * created. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.create_deployment.js + * region_tag:config_v1_generated_Config_CreateDeployment_async + */ + createDeployment( + request?: protos.google.cloud.config.v1.ICreateDeploymentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createDeployment( + request: protos.google.cloud.config.v1.ICreateDeploymentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDeployment( + request: protos.google.cloud.config.v1.ICreateDeploymentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDeployment( + request?: protos.google.cloud.config.v1.ICreateDeploymentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createDeployment response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createDeployment request %j', request); + return this.innerApiCalls.createDeployment(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createDeployment response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createDeployment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.create_deployment.js + * region_tag:config_v1_generated_Config_CreateDeployment_async + */ + async checkCreateDeploymentProgress(name: string): Promise>{ + this._log.info('createDeployment long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createDeployment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a {@link protos.google.cloud.config.v1.Deployment|Deployment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask used to specify the fields to be overwritten in the + * Deployment resource by the update. + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.config.v1.Deployment} request.deployment + * Required. {@link protos.google.cloud.config.v1.Deployment|Deployment} to update. + * + * The deployment's `name` field is used to identify the resource to be + * updated. Format: + * `projects/{project}/locations/{location}/deployments/{deployment}` + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.update_deployment.js + * region_tag:config_v1_generated_Config_UpdateDeployment_async + */ + updateDeployment( + request?: protos.google.cloud.config.v1.IUpdateDeploymentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateDeployment( + request: protos.google.cloud.config.v1.IUpdateDeploymentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDeployment( + request: protos.google.cloud.config.v1.IUpdateDeploymentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDeployment( + request?: protos.google.cloud.config.v1.IUpdateDeploymentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'deployment.name': request.deployment!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateDeployment response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateDeployment request %j', request); + return this.innerApiCalls.updateDeployment(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateDeployment response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateDeployment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.update_deployment.js + * region_tag:config_v1_generated_Config_UpdateDeployment_async + */ + async checkUpdateDeploymentProgress(name: string): Promise>{ + this._log.info('updateDeployment long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateDeployment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a {@link protos.google.cloud.config.v1.Deployment|Deployment}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.force] + * Optional. If set to true, any revisions for this deployment will also be + * deleted. (Otherwise, the request will only work if the deployment has no + * revisions.) + * @param {google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy} [request.deletePolicy] + * Optional. Policy on how resources actuated by the deployment should be + * deleted. If unspecified, the default behavior is to delete the underlying + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.delete_deployment.js + * region_tag:config_v1_generated_Config_DeleteDeployment_async + */ + deleteDeployment( + request?: protos.google.cloud.config.v1.IDeleteDeploymentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteDeployment( + request: protos.google.cloud.config.v1.IDeleteDeploymentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDeployment( + request: protos.google.cloud.config.v1.IDeleteDeploymentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDeployment( + request?: protos.google.cloud.config.v1.IDeleteDeploymentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteDeployment response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteDeployment request %j', request); + return this.innerApiCalls.deleteDeployment(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteDeployment response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteDeployment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.delete_deployment.js + * region_tag:config_v1_generated_Config_DeleteDeployment_async + */ + async checkDeleteDeploymentProgress(name: string): Promise>{ + this._log.info('deleteDeployment long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteDeployment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Locks a deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.lock_deployment.js + * region_tag:config_v1_generated_Config_LockDeployment_async + */ + lockDeployment( + request?: protos.google.cloud.config.v1.ILockDeploymentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + lockDeployment( + request: protos.google.cloud.config.v1.ILockDeploymentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + lockDeployment( + request: protos.google.cloud.config.v1.ILockDeploymentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + lockDeployment( + request?: protos.google.cloud.config.v1.ILockDeploymentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('lockDeployment response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('lockDeployment request %j', request); + return this.innerApiCalls.lockDeployment(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('lockDeployment response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `lockDeployment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.lock_deployment.js + * region_tag:config_v1_generated_Config_LockDeployment_async + */ + async checkLockDeploymentProgress(name: string): Promise>{ + this._log.info('lockDeployment long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.lockDeployment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Unlocks a locked deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param {number} request.lockId + * Required. Lock ID of the lock file to be unlocked. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.unlock_deployment.js + * region_tag:config_v1_generated_Config_UnlockDeployment_async + */ + unlockDeployment( + request?: protos.google.cloud.config.v1.IUnlockDeploymentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + unlockDeployment( + request: protos.google.cloud.config.v1.IUnlockDeploymentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + unlockDeployment( + request: protos.google.cloud.config.v1.IUnlockDeploymentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + unlockDeployment( + request?: protos.google.cloud.config.v1.IUnlockDeploymentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('unlockDeployment response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('unlockDeployment request %j', request); + return this.innerApiCalls.unlockDeployment(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('unlockDeployment response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `unlockDeployment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.unlock_deployment.js + * region_tag:config_v1_generated_Config_UnlockDeployment_async + */ + async checkUnlockDeploymentProgress(name: string): Promise>{ + this._log.info('unlockDeployment long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.unlockDeployment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a {@link protos.google.cloud.config.v1.Preview|Preview}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Preview is created. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. + * @param {string} [request.previewId] + * Optional. The preview ID. + * @param {google.cloud.config.v1.Preview} request.preview + * Required. {@link protos.google.cloud.config.v1.Preview|Preview} resource to be created. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.create_preview.js + * region_tag:config_v1_generated_Config_CreatePreview_async + */ + createPreview( + request?: protos.google.cloud.config.v1.ICreatePreviewRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createPreview( + request: protos.google.cloud.config.v1.ICreatePreviewRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createPreview( + request: protos.google.cloud.config.v1.ICreatePreviewRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createPreview( + request?: protos.google.cloud.config.v1.ICreatePreviewRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createPreview response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createPreview request %j', request); + return this.innerApiCalls.createPreview(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createPreview response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createPreview()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.create_preview.js + * region_tag:config_v1_generated_Config_CreatePreview_async + */ + async checkCreatePreviewProgress(name: string): Promise>{ + this._log.info('createPreview long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createPreview, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a {@link protos.google.cloud.config.v1.Preview|Preview}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Preview in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.delete_preview.js + * region_tag:config_v1_generated_Config_DeletePreview_async + */ + deletePreview( + request?: protos.google.cloud.config.v1.IDeletePreviewRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deletePreview( + request: protos.google.cloud.config.v1.IDeletePreviewRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deletePreview( + request: protos.google.cloud.config.v1.IDeletePreviewRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deletePreview( + request?: protos.google.cloud.config.v1.IDeletePreviewRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deletePreview response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deletePreview request %j', request); + return this.innerApiCalls.deletePreview(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deletePreview response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deletePreview()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.delete_preview.js + * region_tag:config_v1_generated_Config_DeletePreview_async + */ + async checkDeletePreviewProgress(name: string): Promise>{ + this._log.info('deletePreview long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deletePreview, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the AutoMigrationConfig for a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The update mask applies to the resource. See + * {@link protos.google.protobuf.FieldMask|google.protobuf.FieldMask}. + * @param {google.cloud.config.v1.AutoMigrationConfig} request.autoMigrationConfig + * Required. The AutoMigrationConfig to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.update_auto_migration_config.js + * region_tag:config_v1_generated_Config_UpdateAutoMigrationConfig_async + */ + updateAutoMigrationConfig( + request?: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAutoMigrationConfig( + request: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAutoMigrationConfig( + request: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAutoMigrationConfig( + request?: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'auto_migration_config.name': request.autoMigrationConfig!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateAutoMigrationConfig response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateAutoMigrationConfig request %j', request); + return this.innerApiCalls.updateAutoMigrationConfig(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateAutoMigrationConfig response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateAutoMigrationConfig()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.update_auto_migration_config.js + * region_tag:config_v1_generated_Config_UpdateAutoMigrationConfig_async + */ + async checkUpdateAutoMigrationConfigProgress(name: string): Promise>{ + this._log.info('updateAutoMigrationConfig long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateAutoMigrationConfig, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists {@link protos.google.cloud.config.v1.Deployment|Deployment}s in a given project + * and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Deployments are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}'. + * @param {number} request.pageSize + * When requesting a page of resources, 'page_size' specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} request.pageToken + * Token returned by previous call to 'ListDeployments' which specifies the + * position in the list from where to continue listing the resources. + * @param {string} request.filter + * Lists the Deployments that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/bar + * + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * + * - Filter by state: + * - Deployments in CREATING state. + * state=CREATING + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.config.v1.Deployment|Deployment}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDeploymentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeployments( + request?: protos.google.cloud.config.v1.IListDeploymentsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IDeployment[], + protos.google.cloud.config.v1.IListDeploymentsRequest|null, + protos.google.cloud.config.v1.IListDeploymentsResponse + ]>; + listDeployments( + request: protos.google.cloud.config.v1.IListDeploymentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListDeploymentsRequest, + protos.google.cloud.config.v1.IListDeploymentsResponse|null|undefined, + protos.google.cloud.config.v1.IDeployment>): void; + listDeployments( + request: protos.google.cloud.config.v1.IListDeploymentsRequest, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListDeploymentsRequest, + protos.google.cloud.config.v1.IListDeploymentsResponse|null|undefined, + protos.google.cloud.config.v1.IDeployment>): void; + listDeployments( + request?: protos.google.cloud.config.v1.IListDeploymentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.config.v1.IListDeploymentsRequest, + protos.google.cloud.config.v1.IListDeploymentsResponse|null|undefined, + protos.google.cloud.config.v1.IDeployment>, + callback?: PaginationCallback< + protos.google.cloud.config.v1.IListDeploymentsRequest, + protos.google.cloud.config.v1.IListDeploymentsResponse|null|undefined, + protos.google.cloud.config.v1.IDeployment>): + Promise<[ + protos.google.cloud.config.v1.IDeployment[], + protos.google.cloud.config.v1.IListDeploymentsRequest|null, + protos.google.cloud.config.v1.IListDeploymentsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.config.v1.IListDeploymentsRequest, + protos.google.cloud.config.v1.IListDeploymentsResponse|null|undefined, + protos.google.cloud.config.v1.IDeployment>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDeployments values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDeployments request %j', request); + return this.innerApiCalls + .listDeployments(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.config.v1.IDeployment[], + protos.google.cloud.config.v1.IListDeploymentsRequest|null, + protos.google.cloud.config.v1.IListDeploymentsResponse + ]) => { + this._log.info('listDeployments values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listDeployments`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Deployments are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}'. + * @param {number} request.pageSize + * When requesting a page of resources, 'page_size' specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} request.pageToken + * Token returned by previous call to 'ListDeployments' which specifies the + * position in the list from where to continue listing the resources. + * @param {string} request.filter + * Lists the Deployments that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/bar + * + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * + * - Filter by state: + * - Deployments in CREATING state. + * state=CREATING + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.config.v1.Deployment|Deployment} 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 `listDeploymentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeploymentsStream( + request?: protos.google.cloud.config.v1.IListDeploymentsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDeployments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDeployments stream %j', request); + return this.descriptors.page.listDeployments.createStream( + this.innerApiCalls.listDeployments as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDeployments`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Deployments are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}'. + * @param {number} request.pageSize + * When requesting a page of resources, 'page_size' specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} request.pageToken + * Token returned by previous call to 'ListDeployments' which specifies the + * position in the list from where to continue listing the resources. + * @param {string} request.filter + * Lists the Deployments that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/bar + * + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * + * - Filter by state: + * - Deployments in CREATING state. + * state=CREATING + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.config.v1.Deployment|Deployment}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.list_deployments.js + * region_tag:config_v1_generated_Config_ListDeployments_async + */ + listDeploymentsAsync( + request?: protos.google.cloud.config.v1.IListDeploymentsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDeployments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDeployments iterate %j', request); + return this.descriptors.page.listDeployments.asyncIterate( + this.innerApiCalls['listDeployments'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists {@link protos.google.cloud.config.v1.Revision|Revision}s of a deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Revisions are listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param {number} request.pageSize + * When requesting a page of resources, `page_size` specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} request.pageToken + * Token returned by previous call to 'ListRevisions' which specifies the + * position in the list from where to continue listing the resources. + * @param {string} request.filter + * Lists the Revisions that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar + * + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * + * - Filter by state: + * - Revisions in CREATING state. + * state=CREATING + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.config.v1.Revision|Revision}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listRevisionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRevisions( + request?: protos.google.cloud.config.v1.IListRevisionsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IRevision[], + protos.google.cloud.config.v1.IListRevisionsRequest|null, + protos.google.cloud.config.v1.IListRevisionsResponse + ]>; + listRevisions( + request: protos.google.cloud.config.v1.IListRevisionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListRevisionsRequest, + protos.google.cloud.config.v1.IListRevisionsResponse|null|undefined, + protos.google.cloud.config.v1.IRevision>): void; + listRevisions( + request: protos.google.cloud.config.v1.IListRevisionsRequest, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListRevisionsRequest, + protos.google.cloud.config.v1.IListRevisionsResponse|null|undefined, + protos.google.cloud.config.v1.IRevision>): void; + listRevisions( + request?: protos.google.cloud.config.v1.IListRevisionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.config.v1.IListRevisionsRequest, + protos.google.cloud.config.v1.IListRevisionsResponse|null|undefined, + protos.google.cloud.config.v1.IRevision>, + callback?: PaginationCallback< + protos.google.cloud.config.v1.IListRevisionsRequest, + protos.google.cloud.config.v1.IListRevisionsResponse|null|undefined, + protos.google.cloud.config.v1.IRevision>): + Promise<[ + protos.google.cloud.config.v1.IRevision[], + protos.google.cloud.config.v1.IListRevisionsRequest|null, + protos.google.cloud.config.v1.IListRevisionsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.config.v1.IListRevisionsRequest, + protos.google.cloud.config.v1.IListRevisionsResponse|null|undefined, + protos.google.cloud.config.v1.IRevision>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listRevisions values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listRevisions request %j', request); + return this.innerApiCalls + .listRevisions(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.config.v1.IRevision[], + protos.google.cloud.config.v1.IListRevisionsRequest|null, + protos.google.cloud.config.v1.IListRevisionsResponse + ]) => { + this._log.info('listRevisions values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listRevisions`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Revisions are listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param {number} request.pageSize + * When requesting a page of resources, `page_size` specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} request.pageToken + * Token returned by previous call to 'ListRevisions' which specifies the + * position in the list from where to continue listing the resources. + * @param {string} request.filter + * Lists the Revisions that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar + * + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * + * - Filter by state: + * - Revisions in CREATING state. + * state=CREATING + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.config.v1.Revision|Revision} 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 `listRevisionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRevisionsStream( + request?: protos.google.cloud.config.v1.IListRevisionsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRevisions stream %j', request); + return this.descriptors.page.listRevisions.createStream( + this.innerApiCalls.listRevisions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listRevisions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Revisions are listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param {number} request.pageSize + * When requesting a page of resources, `page_size` specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} request.pageToken + * Token returned by previous call to 'ListRevisions' which specifies the + * position in the list from where to continue listing the resources. + * @param {string} request.filter + * Lists the Revisions that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar + * + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * + * - Filter by state: + * - Revisions in CREATING state. + * state=CREATING + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.config.v1.Revision|Revision}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.list_revisions.js + * region_tag:config_v1_generated_Config_ListRevisions_async + */ + listRevisionsAsync( + request?: protos.google.cloud.config.v1.IListRevisionsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listRevisions iterate %j', request); + return this.descriptors.page.listRevisions.asyncIterate( + this.innerApiCalls['listRevisions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists {@link protos.google.cloud.config.v1.Resource|Resources} in a given revision. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Resources are listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + * @param {number} request.pageSize + * When requesting a page of resources, 'page_size' specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} request.pageToken + * Token returned by previous call to 'ListResources' which specifies the + * position in the list from where to continue listing the resources. + * @param {string} request.filter + * Lists the Resources that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.config.v1.Resource|Resource}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listResourcesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listResources( + request?: protos.google.cloud.config.v1.IListResourcesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IResource[], + protos.google.cloud.config.v1.IListResourcesRequest|null, + protos.google.cloud.config.v1.IListResourcesResponse + ]>; + listResources( + request: protos.google.cloud.config.v1.IListResourcesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListResourcesRequest, + protos.google.cloud.config.v1.IListResourcesResponse|null|undefined, + protos.google.cloud.config.v1.IResource>): void; + listResources( + request: protos.google.cloud.config.v1.IListResourcesRequest, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListResourcesRequest, + protos.google.cloud.config.v1.IListResourcesResponse|null|undefined, + protos.google.cloud.config.v1.IResource>): void; + listResources( + request?: protos.google.cloud.config.v1.IListResourcesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.config.v1.IListResourcesRequest, + protos.google.cloud.config.v1.IListResourcesResponse|null|undefined, + protos.google.cloud.config.v1.IResource>, + callback?: PaginationCallback< + protos.google.cloud.config.v1.IListResourcesRequest, + protos.google.cloud.config.v1.IListResourcesResponse|null|undefined, + protos.google.cloud.config.v1.IResource>): + Promise<[ + protos.google.cloud.config.v1.IResource[], + protos.google.cloud.config.v1.IListResourcesRequest|null, + protos.google.cloud.config.v1.IListResourcesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.config.v1.IListResourcesRequest, + protos.google.cloud.config.v1.IListResourcesResponse|null|undefined, + protos.google.cloud.config.v1.IResource>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listResources values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listResources request %j', request); + return this.innerApiCalls + .listResources(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.config.v1.IResource[], + protos.google.cloud.config.v1.IListResourcesRequest|null, + protos.google.cloud.config.v1.IListResourcesResponse + ]) => { + this._log.info('listResources values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listResources`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Resources are listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + * @param {number} request.pageSize + * When requesting a page of resources, 'page_size' specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} request.pageToken + * Token returned by previous call to 'ListResources' which specifies the + * position in the list from where to continue listing the resources. + * @param {string} request.filter + * Lists the Resources that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.config.v1.Resource|Resource} 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 `listResourcesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listResourcesStream( + request?: protos.google.cloud.config.v1.IListResourcesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listResources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listResources stream %j', request); + return this.descriptors.page.listResources.createStream( + this.innerApiCalls.listResources as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listResources`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Resources are listed. The parent + * value is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + * @param {number} request.pageSize + * When requesting a page of resources, 'page_size' specifies number of + * resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} request.pageToken + * Token returned by previous call to 'ListResources' which specifies the + * position in the list from where to continue listing the resources. + * @param {string} request.filter + * Lists the Resources that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.config.v1.Resource|Resource}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.list_resources.js + * region_tag:config_v1_generated_Config_ListResources_async + */ + listResourcesAsync( + request?: protos.google.cloud.config.v1.IListResourcesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listResources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listResources iterate %j', request); + return this.descriptors.page.listResources.asyncIterate( + this.innerApiCalls['listResources'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists {@link protos.google.cloud.config.v1.Preview|Preview}s in a given project and + * location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Previews are listed. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resources, 'page_size' specifies number + * of resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListDeployments' which + * specifies the position in the list from where to continue listing the + * resources. + * @param {string} [request.filter] + * Optional. Lists the Deployments that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/bar + * + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * + * - Filter by state: + * - Deployments in CREATING state. + * state=CREATING + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.config.v1.Preview|Preview}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listPreviewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPreviews( + request?: protos.google.cloud.config.v1.IListPreviewsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IPreview[], + protos.google.cloud.config.v1.IListPreviewsRequest|null, + protos.google.cloud.config.v1.IListPreviewsResponse + ]>; + listPreviews( + request: protos.google.cloud.config.v1.IListPreviewsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListPreviewsRequest, + protos.google.cloud.config.v1.IListPreviewsResponse|null|undefined, + protos.google.cloud.config.v1.IPreview>): void; + listPreviews( + request: protos.google.cloud.config.v1.IListPreviewsRequest, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListPreviewsRequest, + protos.google.cloud.config.v1.IListPreviewsResponse|null|undefined, + protos.google.cloud.config.v1.IPreview>): void; + listPreviews( + request?: protos.google.cloud.config.v1.IListPreviewsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.config.v1.IListPreviewsRequest, + protos.google.cloud.config.v1.IListPreviewsResponse|null|undefined, + protos.google.cloud.config.v1.IPreview>, + callback?: PaginationCallback< + protos.google.cloud.config.v1.IListPreviewsRequest, + protos.google.cloud.config.v1.IListPreviewsResponse|null|undefined, + protos.google.cloud.config.v1.IPreview>): + Promise<[ + protos.google.cloud.config.v1.IPreview[], + protos.google.cloud.config.v1.IListPreviewsRequest|null, + protos.google.cloud.config.v1.IListPreviewsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.config.v1.IListPreviewsRequest, + protos.google.cloud.config.v1.IListPreviewsResponse|null|undefined, + protos.google.cloud.config.v1.IPreview>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listPreviews values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listPreviews request %j', request); + return this.innerApiCalls + .listPreviews(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.config.v1.IPreview[], + protos.google.cloud.config.v1.IListPreviewsRequest|null, + protos.google.cloud.config.v1.IListPreviewsResponse + ]) => { + this._log.info('listPreviews values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listPreviews`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Previews are listed. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resources, 'page_size' specifies number + * of resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListDeployments' which + * specifies the position in the list from where to continue listing the + * resources. + * @param {string} [request.filter] + * Optional. Lists the Deployments that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/bar + * + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * + * - Filter by state: + * - Deployments in CREATING state. + * state=CREATING + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.config.v1.Preview|Preview} 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 `listPreviewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPreviewsStream( + request?: protos.google.cloud.config.v1.IListPreviewsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPreviews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPreviews stream %j', request); + return this.descriptors.page.listPreviews.createStream( + this.innerApiCalls.listPreviews as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listPreviews`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the Previews are listed. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resources, 'page_size' specifies number + * of resources to return. If unspecified, at most 500 will be returned. The + * maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListDeployments' which + * specifies the position in the list from where to continue listing the + * resources. + * @param {string} [request.filter] + * Optional. Lists the Deployments that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form '{field} {operator} {value}' where operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/foo/locations/us-central1/deployments/bar + * + * - Filter by labels: + * - Resources that have a key called 'foo' + * labels.foo:* + * - Resources that have a key called 'foo' whose value is 'bar' + * labels.foo = bar + * + * - Filter by state: + * - Deployments in CREATING state. + * state=CREATING + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.config.v1.Preview|Preview}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.list_previews.js + * region_tag:config_v1_generated_Config_ListPreviews_async + */ + listPreviewsAsync( + request?: protos.google.cloud.config.v1.IListPreviewsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPreviews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPreviews iterate %j', request); + return this.descriptors.page.listPreviews.asyncIterate( + this.innerApiCalls['listPreviews'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion}s in a + * given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the TerraformVersions are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of terraform versions, 'page_size' + * specifies number of terraform versions to return. If unspecified, at most + * 500 will be returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListTerraformVersions' which + * specifies the position in the list from where to continue listing the + * terraform versions. + * @param {string} [request.filter] + * Optional. Lists the TerraformVersions that match the filter expression. A + * filter expression filters the resources listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listTerraformVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTerraformVersions( + request?: protos.google.cloud.config.v1.IListTerraformVersionsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.ITerraformVersion[], + protos.google.cloud.config.v1.IListTerraformVersionsRequest|null, + protos.google.cloud.config.v1.IListTerraformVersionsResponse + ]>; + listTerraformVersions( + request: protos.google.cloud.config.v1.IListTerraformVersionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListTerraformVersionsRequest, + protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined, + protos.google.cloud.config.v1.ITerraformVersion>): void; + listTerraformVersions( + request: protos.google.cloud.config.v1.IListTerraformVersionsRequest, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListTerraformVersionsRequest, + protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined, + protos.google.cloud.config.v1.ITerraformVersion>): void; + listTerraformVersions( + request?: protos.google.cloud.config.v1.IListTerraformVersionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.config.v1.IListTerraformVersionsRequest, + protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined, + protos.google.cloud.config.v1.ITerraformVersion>, + callback?: PaginationCallback< + protos.google.cloud.config.v1.IListTerraformVersionsRequest, + protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined, + protos.google.cloud.config.v1.ITerraformVersion>): + Promise<[ + protos.google.cloud.config.v1.ITerraformVersion[], + protos.google.cloud.config.v1.IListTerraformVersionsRequest|null, + protos.google.cloud.config.v1.IListTerraformVersionsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.config.v1.IListTerraformVersionsRequest, + protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined, + protos.google.cloud.config.v1.ITerraformVersion>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listTerraformVersions values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listTerraformVersions request %j', request); + return this.innerApiCalls + .listTerraformVersions(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.config.v1.ITerraformVersion[], + protos.google.cloud.config.v1.IListTerraformVersionsRequest|null, + protos.google.cloud.config.v1.IListTerraformVersionsResponse + ]) => { + this._log.info('listTerraformVersions values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listTerraformVersions`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the TerraformVersions are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of terraform versions, 'page_size' + * specifies number of terraform versions to return. If unspecified, at most + * 500 will be returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListTerraformVersions' which + * specifies the position in the list from where to continue listing the + * terraform versions. + * @param {string} [request.filter] + * Optional. Lists the TerraformVersions that match the filter expression. A + * filter expression filters the resources listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion} 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 `listTerraformVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTerraformVersionsStream( + request?: protos.google.cloud.config.v1.IListTerraformVersionsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTerraformVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listTerraformVersions stream %j', request); + return this.descriptors.page.listTerraformVersions.createStream( + this.innerApiCalls.listTerraformVersions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listTerraformVersions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the TerraformVersions are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of terraform versions, 'page_size' + * specifies number of terraform versions to return. If unspecified, at most + * 500 will be returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListTerraformVersions' which + * specifies the position in the list from where to continue listing the + * terraform versions. + * @param {string} [request.filter] + * Optional. Lists the TerraformVersions that match the filter expression. A + * filter expression filters the resources listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + * operator which is roughly synonymous with equality). {field} can refer to a + * proto or JSON field, or a synthetic field. Field names can be camelCase or + * snake_case. + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.list_terraform_versions.js + * region_tag:config_v1_generated_Config_ListTerraformVersions_async + */ + listTerraformVersionsAsync( + request?: protos.google.cloud.config.v1.IListTerraformVersionsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTerraformVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listTerraformVersions iterate %j', request); + return this.descriptors.page.listTerraformVersions.asyncIterate( + this.innerApiCalls['listTerraformVersions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists ResourceChanges for a given preview. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the ResourceChanges are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource changes, 'page_size' specifies + * number of resource changes to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceChanges' which + * specifies the position in the list from where to continue listing the + * resource changes. + * @param {string} [request.filter] + * Optional. Lists the resource changes that match the filter expression. A + * filter expression filters the resource changes listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.config.v1.ResourceChange|ResourceChange}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listResourceChangesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listResourceChanges( + request?: protos.google.cloud.config.v1.IListResourceChangesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IResourceChange[], + protos.google.cloud.config.v1.IListResourceChangesRequest|null, + protos.google.cloud.config.v1.IListResourceChangesResponse + ]>; + listResourceChanges( + request: protos.google.cloud.config.v1.IListResourceChangesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceChangesRequest, + protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, + protos.google.cloud.config.v1.IResourceChange>): void; + listResourceChanges( + request: protos.google.cloud.config.v1.IListResourceChangesRequest, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceChangesRequest, + protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, + protos.google.cloud.config.v1.IResourceChange>): void; + listResourceChanges( + request?: protos.google.cloud.config.v1.IListResourceChangesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.config.v1.IListResourceChangesRequest, + protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, + protos.google.cloud.config.v1.IResourceChange>, + callback?: PaginationCallback< + protos.google.cloud.config.v1.IListResourceChangesRequest, + protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, + protos.google.cloud.config.v1.IResourceChange>): + Promise<[ + protos.google.cloud.config.v1.IResourceChange[], + protos.google.cloud.config.v1.IListResourceChangesRequest|null, + protos.google.cloud.config.v1.IListResourceChangesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceChangesRequest, + protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, + protos.google.cloud.config.v1.IResourceChange>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listResourceChanges values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listResourceChanges request %j', request); + return this.innerApiCalls + .listResourceChanges(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.config.v1.IResourceChange[], + protos.google.cloud.config.v1.IListResourceChangesRequest|null, + protos.google.cloud.config.v1.IListResourceChangesResponse + ]) => { + this._log.info('listResourceChanges values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listResourceChanges`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the ResourceChanges are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource changes, 'page_size' specifies + * number of resource changes to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceChanges' which + * specifies the position in the list from where to continue listing the + * resource changes. + * @param {string} [request.filter] + * Optional. Lists the resource changes that match the filter expression. A + * filter expression filters the resource changes listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.config.v1.ResourceChange|ResourceChange} 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 `listResourceChangesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listResourceChangesStream( + request?: protos.google.cloud.config.v1.IListResourceChangesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listResourceChanges']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listResourceChanges stream %j', request); + return this.descriptors.page.listResourceChanges.createStream( + this.innerApiCalls.listResourceChanges as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listResourceChanges`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the ResourceChanges are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource changes, 'page_size' specifies + * number of resource changes to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceChanges' which + * specifies the position in the list from where to continue listing the + * resource changes. + * @param {string} [request.filter] + * Optional. Lists the resource changes that match the filter expression. A + * filter expression filters the resource changes listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.config.v1.ResourceChange|ResourceChange}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.list_resource_changes.js + * region_tag:config_v1_generated_Config_ListResourceChanges_async + */ + listResourceChangesAsync( + request?: protos.google.cloud.config.v1.IListResourceChangesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listResourceChanges']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listResourceChanges iterate %j', request); + return this.descriptors.page.listResourceChanges.asyncIterate( + this.innerApiCalls['listResourceChanges'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * List ResourceDrifts for a given preview. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the ResourceDrifts are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource drifts, 'page_size' specifies + * number of resource drifts to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceDrifts' which + * specifies the position in the list from where to continue listing the + * resource drifts. + * @param {string} [request.filter] + * Optional. Lists the resource drifts that match the filter expression. A + * filter expression filters the resource drifts listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.config.v1.ResourceDrift|ResourceDrift}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listResourceDriftsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listResourceDrifts( + request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IResourceDrift[], + protos.google.cloud.config.v1.IListResourceDriftsRequest|null, + protos.google.cloud.config.v1.IListResourceDriftsResponse + ]>; + listResourceDrifts( + request: protos.google.cloud.config.v1.IListResourceDriftsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceDriftsRequest, + protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, + protos.google.cloud.config.v1.IResourceDrift>): void; + listResourceDrifts( + request: protos.google.cloud.config.v1.IListResourceDriftsRequest, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceDriftsRequest, + protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, + protos.google.cloud.config.v1.IResourceDrift>): void; + listResourceDrifts( + request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.config.v1.IListResourceDriftsRequest, + protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, + protos.google.cloud.config.v1.IResourceDrift>, + callback?: PaginationCallback< + protos.google.cloud.config.v1.IListResourceDriftsRequest, + protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, + protos.google.cloud.config.v1.IResourceDrift>): + Promise<[ + protos.google.cloud.config.v1.IResourceDrift[], + protos.google.cloud.config.v1.IListResourceDriftsRequest|null, + protos.google.cloud.config.v1.IListResourceDriftsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceDriftsRequest, + protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, + protos.google.cloud.config.v1.IResourceDrift>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listResourceDrifts values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listResourceDrifts request %j', request); + return this.innerApiCalls + .listResourceDrifts(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.config.v1.IResourceDrift[], + protos.google.cloud.config.v1.IListResourceDriftsRequest|null, + protos.google.cloud.config.v1.IListResourceDriftsResponse + ]) => { + this._log.info('listResourceDrifts values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listResourceDrifts`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the ResourceDrifts are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource drifts, 'page_size' specifies + * number of resource drifts to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceDrifts' which + * specifies the position in the list from where to continue listing the + * resource drifts. + * @param {string} [request.filter] + * Optional. Lists the resource drifts that match the filter expression. A + * filter expression filters the resource drifts listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.config.v1.ResourceDrift|ResourceDrift} 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 `listResourceDriftsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listResourceDriftsStream( + request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listResourceDrifts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listResourceDrifts stream %j', request); + return this.descriptors.page.listResourceDrifts.createStream( + this.innerApiCalls.listResourceDrifts as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listResourceDrifts`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the ResourceDrifts are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource drifts, 'page_size' specifies + * number of resource drifts to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceDrifts' which + * specifies the position in the list from where to continue listing the + * resource drifts. + * @param {string} [request.filter] + * Optional. Lists the resource drifts that match the filter expression. A + * filter expression filters the resource drifts listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.config.v1.ResourceDrift|ResourceDrift}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.list_resource_drifts.js + * region_tag:config_v1_generated_Config_ListResourceDrifts_async + */ + listResourceDriftsAsync( + request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listResourceDrifts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listResourceDrifts iterate %j', request); + return this.descriptors.page.listResourceDrifts.asyncIterate( + this.innerApiCalls['listResourceDrifts'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ):Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.getIamPolicy(request, options, callback); + } + +/** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ):Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.setIamPolicy(request, options, callback); + } + +/** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ):Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { + return this.iamClient.testIamPermissions(request, options, callback); + } + +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + 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'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + 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'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + 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'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified autoMigrationConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + autoMigrationConfigPath(project:string,location:string) { + return this.pathTemplates.autoMigrationConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AutoMigrationConfig resource. + * + * @param {string} autoMigrationConfigName + * A fully-qualified path representing AutoMigrationConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAutoMigrationConfigName(autoMigrationConfigName: string) { + return this.pathTemplates.autoMigrationConfigPathTemplate.match(autoMigrationConfigName).project; + } + + /** + * Parse the location from AutoMigrationConfig resource. + * + * @param {string} autoMigrationConfigName + * A fully-qualified path representing AutoMigrationConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAutoMigrationConfigName(autoMigrationConfigName: string) { + return this.pathTemplates.autoMigrationConfigPathTemplate.match(autoMigrationConfigName).location; + } + + /** + * Return a fully-qualified deployment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} deployment + * @returns {string} Resource name string. + */ + deploymentPath(project:string,location:string,deployment:string) { + return this.pathTemplates.deploymentPathTemplate.render({ + project: project, + location: location, + deployment: deployment, + }); + } + + /** + * Parse the project from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).project; + } + + /** + * Parse the location from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).location; + } + + /** + * Parse the deployment from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the deployment. + */ + matchDeploymentFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).deployment; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified preview resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} preview + * @returns {string} Resource name string. + */ + previewPath(project:string,location:string,preview:string) { + return this.pathTemplates.previewPathTemplate.render({ + project: project, + location: location, + preview: preview, + }); + } + + /** + * Parse the project from Preview resource. + * + * @param {string} previewName + * A fully-qualified path representing Preview resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPreviewName(previewName: string) { + return this.pathTemplates.previewPathTemplate.match(previewName).project; + } + + /** + * Parse the location from Preview resource. + * + * @param {string} previewName + * A fully-qualified path representing Preview resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPreviewName(previewName: string) { + return this.pathTemplates.previewPathTemplate.match(previewName).location; + } + + /** + * Parse the preview from Preview resource. + * + * @param {string} previewName + * A fully-qualified path representing Preview resource. + * @returns {string} A string representing the preview. + */ + matchPreviewFromPreviewName(previewName: string) { + return this.pathTemplates.previewPathTemplate.match(previewName).preview; + } + + /** + * Return a fully-qualified resource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} deployment + * @param {string} revision + * @param {string} resource + * @returns {string} Resource name string. + */ + resourcePath(project:string,location:string,deployment:string,revision:string,resource:string) { + return this.pathTemplates.resourcePathTemplate.render({ + project: project, + location: location, + deployment: deployment, + revision: revision, + resource: resource, + }); + } + + /** + * Parse the project from Resource resource. + * + * @param {string} resourceName + * A fully-qualified path representing Resource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromResourceName(resourceName: string) { + return this.pathTemplates.resourcePathTemplate.match(resourceName).project; + } + + /** + * Parse the location from Resource resource. + * + * @param {string} resourceName + * A fully-qualified path representing Resource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromResourceName(resourceName: string) { + return this.pathTemplates.resourcePathTemplate.match(resourceName).location; + } + + /** + * Parse the deployment from Resource resource. + * + * @param {string} resourceName + * A fully-qualified path representing Resource resource. + * @returns {string} A string representing the deployment. + */ + matchDeploymentFromResourceName(resourceName: string) { + return this.pathTemplates.resourcePathTemplate.match(resourceName).deployment; + } + + /** + * Parse the revision from Resource resource. + * + * @param {string} resourceName + * A fully-qualified path representing Resource resource. + * @returns {string} A string representing the revision. + */ + matchRevisionFromResourceName(resourceName: string) { + return this.pathTemplates.resourcePathTemplate.match(resourceName).revision; + } + + /** + * Parse the resource from Resource resource. + * + * @param {string} resourceName + * A fully-qualified path representing Resource resource. + * @returns {string} A string representing the resource. + */ + matchResourceFromResourceName(resourceName: string) { + return this.pathTemplates.resourcePathTemplate.match(resourceName).resource; + } + + /** + * Return a fully-qualified resourceChange resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} preview + * @param {string} resource_change + * @returns {string} Resource name string. + */ + resourceChangePath(project:string,location:string,preview:string,resourceChange:string) { + return this.pathTemplates.resourceChangePathTemplate.render({ + project: project, + location: location, + preview: preview, + resource_change: resourceChange, + }); + } + + /** + * Parse the project from ResourceChange resource. + * + * @param {string} resourceChangeName + * A fully-qualified path representing ResourceChange resource. + * @returns {string} A string representing the project. + */ + matchProjectFromResourceChangeName(resourceChangeName: string) { + return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).project; + } + + /** + * Parse the location from ResourceChange resource. + * + * @param {string} resourceChangeName + * A fully-qualified path representing ResourceChange resource. + * @returns {string} A string representing the location. + */ + matchLocationFromResourceChangeName(resourceChangeName: string) { + return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).location; + } + + /** + * Parse the preview from ResourceChange resource. + * + * @param {string} resourceChangeName + * A fully-qualified path representing ResourceChange resource. + * @returns {string} A string representing the preview. + */ + matchPreviewFromResourceChangeName(resourceChangeName: string) { + return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).preview; + } + + /** + * Parse the resource_change from ResourceChange resource. + * + * @param {string} resourceChangeName + * A fully-qualified path representing ResourceChange resource. + * @returns {string} A string representing the resource_change. + */ + matchResourceChangeFromResourceChangeName(resourceChangeName: string) { + return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).resource_change; + } + + /** + * Return a fully-qualified resourceDrift resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} preview + * @param {string} resource_drift + * @returns {string} Resource name string. + */ + resourceDriftPath(project:string,location:string,preview:string,resourceDrift:string) { + return this.pathTemplates.resourceDriftPathTemplate.render({ + project: project, + location: location, + preview: preview, + resource_drift: resourceDrift, + }); + } + + /** + * Parse the project from ResourceDrift resource. + * + * @param {string} resourceDriftName + * A fully-qualified path representing ResourceDrift resource. + * @returns {string} A string representing the project. + */ + matchProjectFromResourceDriftName(resourceDriftName: string) { + return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).project; + } + + /** + * Parse the location from ResourceDrift resource. + * + * @param {string} resourceDriftName + * A fully-qualified path representing ResourceDrift resource. + * @returns {string} A string representing the location. + */ + matchLocationFromResourceDriftName(resourceDriftName: string) { + return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).location; + } + + /** + * Parse the preview from ResourceDrift resource. + * + * @param {string} resourceDriftName + * A fully-qualified path representing ResourceDrift resource. + * @returns {string} A string representing the preview. + */ + matchPreviewFromResourceDriftName(resourceDriftName: string) { + return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).preview; + } + + /** + * Parse the resource_drift from ResourceDrift resource. + * + * @param {string} resourceDriftName + * A fully-qualified path representing ResourceDrift resource. + * @returns {string} A string representing the resource_drift. + */ + matchResourceDriftFromResourceDriftName(resourceDriftName: string) { + return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).resource_drift; + } + + /** + * Return a fully-qualified revision resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} deployment + * @param {string} revision + * @returns {string} Resource name string. + */ + revisionPath(project:string,location:string,deployment:string,revision:string) { + return this.pathTemplates.revisionPathTemplate.render({ + project: project, + location: location, + deployment: deployment, + revision: revision, + }); + } + + /** + * Parse the project from Revision resource. + * + * @param {string} revisionName + * A fully-qualified path representing Revision resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRevisionName(revisionName: string) { + return this.pathTemplates.revisionPathTemplate.match(revisionName).project; + } + + /** + * Parse the location from Revision resource. + * + * @param {string} revisionName + * A fully-qualified path representing Revision resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRevisionName(revisionName: string) { + return this.pathTemplates.revisionPathTemplate.match(revisionName).location; + } + + /** + * Parse the deployment from Revision resource. + * + * @param {string} revisionName + * A fully-qualified path representing Revision resource. + * @returns {string} A string representing the deployment. + */ + matchDeploymentFromRevisionName(revisionName: string) { + return this.pathTemplates.revisionPathTemplate.match(revisionName).deployment; + } + + /** + * Parse the revision from Revision resource. + * + * @param {string} revisionName + * A fully-qualified path representing Revision resource. + * @returns {string} A string representing the revision. + */ + matchRevisionFromRevisionName(revisionName: string) { + return this.pathTemplates.revisionPathTemplate.match(revisionName).revision; + } + + /** + * Return a fully-qualified serviceAccount resource name string. + * + * @param {string} project + * @param {string} service_account + * @returns {string} Resource name string. + */ + serviceAccountPath(project:string,serviceAccount:string) { + return this.pathTemplates.serviceAccountPathTemplate.render({ + project: project, + service_account: serviceAccount, + }); + } + + /** + * Parse the project from ServiceAccount resource. + * + * @param {string} serviceAccountName + * A fully-qualified path representing ServiceAccount resource. + * @returns {string} A string representing the project. + */ + matchProjectFromServiceAccountName(serviceAccountName: string) { + return this.pathTemplates.serviceAccountPathTemplate.match(serviceAccountName).project; + } + + /** + * Parse the service_account from ServiceAccount resource. + * + * @param {string} serviceAccountName + * A fully-qualified path representing ServiceAccount resource. + * @returns {string} A string representing the service_account. + */ + matchServiceAccountFromServiceAccountName(serviceAccountName: string) { + return this.pathTemplates.serviceAccountPathTemplate.match(serviceAccountName).service_account; + } + + /** + * Return a fully-qualified terraformVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} terraform_version + * @returns {string} Resource name string. + */ + terraformVersionPath(project:string,location:string,terraformVersion:string) { + return this.pathTemplates.terraformVersionPathTemplate.render({ + project: project, + location: location, + terraform_version: terraformVersion, + }); + } + + /** + * Parse the project from TerraformVersion resource. + * + * @param {string} terraformVersionName + * A fully-qualified path representing TerraformVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTerraformVersionName(terraformVersionName: string) { + return this.pathTemplates.terraformVersionPathTemplate.match(terraformVersionName).project; + } + + /** + * Parse the location from TerraformVersion resource. + * + * @param {string} terraformVersionName + * A fully-qualified path representing TerraformVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTerraformVersionName(terraformVersionName: string) { + return this.pathTemplates.terraformVersionPathTemplate.match(terraformVersionName).location; + } + + /** + * Parse the terraform_version from TerraformVersion resource. + * + * @param {string} terraformVersionName + * A fully-qualified path representing TerraformVersion resource. + * @returns {string} A string representing the terraform_version. + */ + matchTerraformVersionFromTerraformVersionName(terraformVersionName: string) { + return this.pathTemplates.terraformVersionPathTemplate.match(terraformVersionName).terraform_version; + } + + /** + * Return a fully-qualified workerPool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} worker_pool + * @returns {string} Resource name string. + */ + workerPoolPath(project:string,location:string,workerPool:string) { + return this.pathTemplates.workerPoolPathTemplate.render({ + project: project, + location: location, + worker_pool: workerPool, + }); + } + + /** + * Parse the project from WorkerPool resource. + * + * @param {string} workerPoolName + * A fully-qualified path representing WorkerPool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkerPoolName(workerPoolName: string) { + return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName).project; + } + + /** + * Parse the location from WorkerPool resource. + * + * @param {string} workerPoolName + * A fully-qualified path representing WorkerPool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkerPoolName(workerPoolName: string) { + return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName).location; + } + + /** + * Parse the worker_pool from WorkerPool resource. + * + * @param {string} workerPoolName + * A fully-qualified path representing WorkerPool resource. + * @returns {string} A string representing the worker_pool. + */ + matchWorkerPoolFromWorkerPoolName(workerPoolName: string) { + return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName).worker_pool; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.configStub && !this._terminated) { + return this.configStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.iamClient.close().catch(err => {throw err}); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/src/v1/config_client_config.json b/owl-bot-staging/google-cloud-config/src/v1/config_client_config.json new file mode 100644 index 00000000000..5ea0334b5ba --- /dev/null +++ b/owl-bot-staging/google-cloud-config/src/v1/config_client_config.json @@ -0,0 +1,183 @@ +{ + "interfaces": { + "google.cloud.config.v1.Config": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetRevision": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetResource": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListResources": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ExportDeploymentStatefile": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ExportRevisionStatefile": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ImportStatefile": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteStatefile": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "LockDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UnlockDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ExportLockInfo": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreatePreview": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetPreview": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListPreviews": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeletePreview": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ExportPreviewResult": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListTerraformVersions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetTerraformVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListResourceChanges": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetResourceChange": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListResourceDrifts": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetResourceDrift": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetAutoMigrationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateAutoMigrationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-config/src/v1/config_proto_list.json b/owl-bot-staging/google-cloud-config/src/v1/config_proto_list.json new file mode 100644 index 00000000000..7abf815f907 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/src/v1/config_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/config/v1/config.proto" +] diff --git a/owl-bot-staging/google-cloud-config/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-config/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..171a745b9e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/src/v1/gapic_metadata.json @@ -0,0 +1,341 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.config.v1", + "libraryPackage": "@google-cloud/config", + "services": { + "Config": { + "clients": { + "grpc": { + "libraryClient": "ConfigClient", + "rpcs": { + "GetDeployment": { + "methods": [ + "getDeployment" + ] + }, + "GetRevision": { + "methods": [ + "getRevision" + ] + }, + "GetResource": { + "methods": [ + "getResource" + ] + }, + "ExportDeploymentStatefile": { + "methods": [ + "exportDeploymentStatefile" + ] + }, + "ExportRevisionStatefile": { + "methods": [ + "exportRevisionStatefile" + ] + }, + "ImportStatefile": { + "methods": [ + "importStatefile" + ] + }, + "DeleteStatefile": { + "methods": [ + "deleteStatefile" + ] + }, + "ExportLockInfo": { + "methods": [ + "exportLockInfo" + ] + }, + "GetPreview": { + "methods": [ + "getPreview" + ] + }, + "ExportPreviewResult": { + "methods": [ + "exportPreviewResult" + ] + }, + "GetTerraformVersion": { + "methods": [ + "getTerraformVersion" + ] + }, + "GetResourceChange": { + "methods": [ + "getResourceChange" + ] + }, + "GetResourceDrift": { + "methods": [ + "getResourceDrift" + ] + }, + "GetAutoMigrationConfig": { + "methods": [ + "getAutoMigrationConfig" + ] + }, + "CreateDeployment": { + "methods": [ + "createDeployment" + ] + }, + "UpdateDeployment": { + "methods": [ + "updateDeployment" + ] + }, + "DeleteDeployment": { + "methods": [ + "deleteDeployment" + ] + }, + "LockDeployment": { + "methods": [ + "lockDeployment" + ] + }, + "UnlockDeployment": { + "methods": [ + "unlockDeployment" + ] + }, + "CreatePreview": { + "methods": [ + "createPreview" + ] + }, + "DeletePreview": { + "methods": [ + "deletePreview" + ] + }, + "UpdateAutoMigrationConfig": { + "methods": [ + "updateAutoMigrationConfig" + ] + }, + "ListDeployments": { + "methods": [ + "listDeployments", + "listDeploymentsStream", + "listDeploymentsAsync" + ] + }, + "ListRevisions": { + "methods": [ + "listRevisions", + "listRevisionsStream", + "listRevisionsAsync" + ] + }, + "ListResources": { + "methods": [ + "listResources", + "listResourcesStream", + "listResourcesAsync" + ] + }, + "ListPreviews": { + "methods": [ + "listPreviews", + "listPreviewsStream", + "listPreviewsAsync" + ] + }, + "ListTerraformVersions": { + "methods": [ + "listTerraformVersions", + "listTerraformVersionsStream", + "listTerraformVersionsAsync" + ] + }, + "ListResourceChanges": { + "methods": [ + "listResourceChanges", + "listResourceChangesStream", + "listResourceChangesAsync" + ] + }, + "ListResourceDrifts": { + "methods": [ + "listResourceDrifts", + "listResourceDriftsStream", + "listResourceDriftsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ConfigClient", + "rpcs": { + "GetDeployment": { + "methods": [ + "getDeployment" + ] + }, + "GetRevision": { + "methods": [ + "getRevision" + ] + }, + "GetResource": { + "methods": [ + "getResource" + ] + }, + "ExportDeploymentStatefile": { + "methods": [ + "exportDeploymentStatefile" + ] + }, + "ExportRevisionStatefile": { + "methods": [ + "exportRevisionStatefile" + ] + }, + "ImportStatefile": { + "methods": [ + "importStatefile" + ] + }, + "DeleteStatefile": { + "methods": [ + "deleteStatefile" + ] + }, + "ExportLockInfo": { + "methods": [ + "exportLockInfo" + ] + }, + "GetPreview": { + "methods": [ + "getPreview" + ] + }, + "ExportPreviewResult": { + "methods": [ + "exportPreviewResult" + ] + }, + "GetTerraformVersion": { + "methods": [ + "getTerraformVersion" + ] + }, + "GetResourceChange": { + "methods": [ + "getResourceChange" + ] + }, + "GetResourceDrift": { + "methods": [ + "getResourceDrift" + ] + }, + "GetAutoMigrationConfig": { + "methods": [ + "getAutoMigrationConfig" + ] + }, + "CreateDeployment": { + "methods": [ + "createDeployment" + ] + }, + "UpdateDeployment": { + "methods": [ + "updateDeployment" + ] + }, + "DeleteDeployment": { + "methods": [ + "deleteDeployment" + ] + }, + "LockDeployment": { + "methods": [ + "lockDeployment" + ] + }, + "UnlockDeployment": { + "methods": [ + "unlockDeployment" + ] + }, + "CreatePreview": { + "methods": [ + "createPreview" + ] + }, + "DeletePreview": { + "methods": [ + "deletePreview" + ] + }, + "UpdateAutoMigrationConfig": { + "methods": [ + "updateAutoMigrationConfig" + ] + }, + "ListDeployments": { + "methods": [ + "listDeployments", + "listDeploymentsStream", + "listDeploymentsAsync" + ] + }, + "ListRevisions": { + "methods": [ + "listRevisions", + "listRevisionsStream", + "listRevisionsAsync" + ] + }, + "ListResources": { + "methods": [ + "listResources", + "listResourcesStream", + "listResourcesAsync" + ] + }, + "ListPreviews": { + "methods": [ + "listPreviews", + "listPreviewsStream", + "listPreviewsAsync" + ] + }, + "ListTerraformVersions": { + "methods": [ + "listTerraformVersions", + "listTerraformVersionsStream", + "listTerraformVersionsAsync" + ] + }, + "ListResourceChanges": { + "methods": [ + "listResourceChanges", + "listResourceChangesStream", + "listResourceChangesAsync" + ] + }, + "ListResourceDrifts": { + "methods": [ + "listResourceDrifts", + "listResourceDriftsStream", + "listResourceDriftsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-config/src/v1/index.ts b/owl-bot-staging/google-cloud-config/src/v1/index.ts new file mode 100644 index 00000000000..1e486407673 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 {ConfigClient} from './config_client'; diff --git a/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..50af44d34cf --- /dev/null +++ b/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 config = require('@google-cloud/config'); + +function main() { + const configClient = new config.ConfigClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..273682dac59 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 {ConfigClient} from '@google-cloud/config'; + +// check that the client class type name can be used +function doStuffWithConfigClient(client: ConfigClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const configClient = new ConfigClient(); + doStuffWithConfigClient(configClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-config/system-test/install.ts b/owl-bot-staging/google-cloud-config/system-test/install.ts new file mode 100644 index 00000000000..394f3362d20 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/google-cloud-config/test/gapic_config_v1.ts b/owl-bot-staging/google-cloud-config/test/gapic_config_v1.ts new file mode 100644 index 00000000000..893be72024a --- /dev/null +++ b/owl-bot-staging/google-cloud-config/test/gapic_config_v1.ts @@ -0,0 +1,5966 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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 configModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, IamProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +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) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ConfigClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new configModule.v1.ConfigClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'config.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new configModule.v1.ConfigClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = configModule.v1.ConfigClient.servicePath; + assert.strictEqual(servicePath, 'config.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = configModule.v1.ConfigClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'config.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new configModule.v1.ConfigClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'config.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new configModule.v1.ConfigClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'config.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new configModule.v1.ConfigClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'config.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new configModule.v1.ConfigClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'config.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new configModule.v1.ConfigClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = configModule.v1.ConfigClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new configModule.v1.ConfigClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new configModule.v1.ConfigClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.configStub, undefined); + await client.initialize(); + assert(client.configStub); + }); + + it('has close method for the initialized client', done => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.configStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.configStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new configModule.v1.ConfigClient({ + 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 configModule.v1.ConfigClient({ + 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('getDeployment', () => { + it('invokes getDeployment without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Deployment() + ); + client.innerApiCalls.getDeployment = stubSimpleCall(expectedResponse); + const [response] = await client.getDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeployment without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Deployment() + ); + client.innerApiCalls.getDeployment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDeployment( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IDeployment|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeployment with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDeployment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDeployment(request), expectedError); + const actualRequest = (client.innerApiCalls.getDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeployment with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getDeployment(request), expectedError); + }); + }); + + describe('getRevision', () => { + it('invokes getRevision without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetRevisionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetRevisionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Revision() + ); + client.innerApiCalls.getRevision = stubSimpleCall(expectedResponse); + const [response] = await client.getRevision(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRevision as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRevision as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRevision without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetRevisionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetRevisionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Revision() + ); + client.innerApiCalls.getRevision = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRevision( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IRevision|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRevision as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRevision as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRevision with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetRevisionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetRevisionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRevision = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getRevision(request), expectedError); + const actualRequest = (client.innerApiCalls.getRevision as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRevision as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRevision with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetRevisionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetRevisionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getRevision(request), expectedError); + }); + }); + + describe('getResource', () => { + it('invokes getResource without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Resource() + ); + client.innerApiCalls.getResource = stubSimpleCall(expectedResponse); + const [response] = await client.getResource(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getResource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResource without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Resource() + ); + client.innerApiCalls.getResource = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getResource( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IResource|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getResource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResource with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getResource = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getResource(request), expectedError); + const actualRequest = (client.innerApiCalls.getResource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResource with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getResource(request), expectedError); + }); + }); + + describe('exportDeploymentStatefile', () => { + it('invokes exportDeploymentStatefile without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportDeploymentStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Statefile() + ); + client.innerApiCalls.exportDeploymentStatefile = stubSimpleCall(expectedResponse); + const [response] = await client.exportDeploymentStatefile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportDeploymentStatefile without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportDeploymentStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Statefile() + ); + client.innerApiCalls.exportDeploymentStatefile = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportDeploymentStatefile( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IStatefile|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportDeploymentStatefile with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportDeploymentStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportDeploymentStatefile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.exportDeploymentStatefile(request), expectedError); + const actualRequest = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportDeploymentStatefile with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportDeploymentStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.exportDeploymentStatefile(request), expectedError); + }); + }); + + describe('exportRevisionStatefile', () => { + it('invokes exportRevisionStatefile without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportRevisionStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Statefile() + ); + client.innerApiCalls.exportRevisionStatefile = stubSimpleCall(expectedResponse); + const [response] = await client.exportRevisionStatefile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportRevisionStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportRevisionStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportRevisionStatefile without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportRevisionStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Statefile() + ); + client.innerApiCalls.exportRevisionStatefile = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportRevisionStatefile( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IStatefile|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportRevisionStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportRevisionStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportRevisionStatefile with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportRevisionStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportRevisionStatefile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.exportRevisionStatefile(request), expectedError); + const actualRequest = (client.innerApiCalls.exportRevisionStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportRevisionStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportRevisionStatefile with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportRevisionStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.exportRevisionStatefile(request), expectedError); + }); + }); + + describe('importStatefile', () => { + it('invokes importStatefile without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ImportStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ImportStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Statefile() + ); + client.innerApiCalls.importStatefile = stubSimpleCall(expectedResponse); + const [response] = await client.importStatefile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importStatefile without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ImportStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ImportStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Statefile() + ); + client.innerApiCalls.importStatefile = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importStatefile( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IStatefile|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importStatefile with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ImportStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ImportStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importStatefile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.importStatefile(request), expectedError); + const actualRequest = (client.innerApiCalls.importStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importStatefile with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ImportStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ImportStatefileRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.importStatefile(request), expectedError); + }); + }); + + describe('deleteStatefile', () => { + it('invokes deleteStatefile without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeleteStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeleteStatefileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteStatefile = stubSimpleCall(expectedResponse); + const [response] = await client.deleteStatefile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStatefile without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeleteStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeleteStatefileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteStatefile = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteStatefile( + 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); + const actualRequest = (client.innerApiCalls.deleteStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStatefile with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeleteStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeleteStatefileRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteStatefile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteStatefile(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteStatefile as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteStatefile as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStatefile with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeleteStatefileRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeleteStatefileRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteStatefile(request), expectedError); + }); + }); + + describe('exportLockInfo', () => { + it('invokes exportLockInfo without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportLockInfoRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportLockInfoRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.LockInfo() + ); + client.innerApiCalls.exportLockInfo = stubSimpleCall(expectedResponse); + const [response] = await client.exportLockInfo(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportLockInfo as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportLockInfo as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportLockInfo without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportLockInfoRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportLockInfoRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.LockInfo() + ); + client.innerApiCalls.exportLockInfo = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportLockInfo( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.ILockInfo|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportLockInfo as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportLockInfo as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportLockInfo with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportLockInfoRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportLockInfoRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportLockInfo = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.exportLockInfo(request), expectedError); + const actualRequest = (client.innerApiCalls.exportLockInfo as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportLockInfo as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportLockInfo with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportLockInfoRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportLockInfoRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.exportLockInfo(request), expectedError); + }); + }); + + describe('getPreview', () => { + it('invokes getPreview without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetPreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetPreviewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Preview() + ); + client.innerApiCalls.getPreview = stubSimpleCall(expectedResponse); + const [response] = await client.getPreview(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPreview as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPreview as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPreview without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetPreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetPreviewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.Preview() + ); + client.innerApiCalls.getPreview = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPreview( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IPreview|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPreview as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPreview as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPreview with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetPreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetPreviewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPreview = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPreview(request), expectedError); + const actualRequest = (client.innerApiCalls.getPreview as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPreview as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPreview with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetPreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetPreviewRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getPreview(request), expectedError); + }); + }); + + describe('exportPreviewResult', () => { + it('invokes exportPreviewResult without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportPreviewResultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportPreviewResultRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.ExportPreviewResultResponse() + ); + client.innerApiCalls.exportPreviewResult = stubSimpleCall(expectedResponse); + const [response] = await client.exportPreviewResult(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportPreviewResult as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportPreviewResult as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportPreviewResult without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportPreviewResultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportPreviewResultRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.ExportPreviewResultResponse() + ); + client.innerApiCalls.exportPreviewResult = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportPreviewResult( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IExportPreviewResultResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportPreviewResult as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportPreviewResult as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportPreviewResult with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportPreviewResultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportPreviewResultRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportPreviewResult = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.exportPreviewResult(request), expectedError); + const actualRequest = (client.innerApiCalls.exportPreviewResult as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportPreviewResult as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportPreviewResult with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ExportPreviewResultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ExportPreviewResultRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.exportPreviewResult(request), expectedError); + }); + }); + + describe('getTerraformVersion', () => { + it('invokes getTerraformVersion without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetTerraformVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetTerraformVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.TerraformVersion() + ); + client.innerApiCalls.getTerraformVersion = stubSimpleCall(expectedResponse); + const [response] = await client.getTerraformVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTerraformVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTerraformVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTerraformVersion without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetTerraformVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetTerraformVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.TerraformVersion() + ); + client.innerApiCalls.getTerraformVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTerraformVersion( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.ITerraformVersion|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTerraformVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTerraformVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTerraformVersion with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetTerraformVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetTerraformVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getTerraformVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTerraformVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.getTerraformVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTerraformVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTerraformVersion with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetTerraformVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetTerraformVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getTerraformVersion(request), expectedError); + }); + }); + + describe('getResourceChange', () => { + it('invokes getResourceChange without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceChangeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.ResourceChange() + ); + client.innerApiCalls.getResourceChange = stubSimpleCall(expectedResponse); + const [response] = await client.getResourceChange(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceChange without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceChangeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.ResourceChange() + ); + client.innerApiCalls.getResourceChange = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getResourceChange( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceChange|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceChange with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceChangeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getResourceChange = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getResourceChange(request), expectedError); + const actualRequest = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceChange with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceChangeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getResourceChange(request), expectedError); + }); + }); + + describe('getResourceDrift', () => { + it('invokes getResourceDrift without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceDriftRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.ResourceDrift() + ); + client.innerApiCalls.getResourceDrift = stubSimpleCall(expectedResponse); + const [response] = await client.getResourceDrift(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceDrift without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceDriftRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.ResourceDrift() + ); + client.innerApiCalls.getResourceDrift = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getResourceDrift( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceDrift|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceDrift with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceDriftRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getResourceDrift = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getResourceDrift(request), expectedError); + const actualRequest = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceDrift with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceDriftRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getResourceDrift(request), expectedError); + }); + }); + + describe('getAutoMigrationConfig', () => { + it('invokes getAutoMigrationConfig without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.AutoMigrationConfig() + ); + client.innerApiCalls.getAutoMigrationConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getAutoMigrationConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoMigrationConfig without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.AutoMigrationConfig() + ); + client.innerApiCalls.getAutoMigrationConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAutoMigrationConfig( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IAutoMigrationConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoMigrationConfig with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAutoMigrationConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAutoMigrationConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoMigrationConfig with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getAutoMigrationConfig(request), expectedError); + }); + }); + + describe('createDeployment', () => { + it('invokes createDeployment without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.CreateDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.CreateDeploymentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDeployment = stubLongRunningCall(expectedResponse); + const [operation] = await client.createDeployment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeployment without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.CreateDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.CreateDeploymentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDeployment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDeployment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeployment with call error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.CreateDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.CreateDeploymentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeployment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createDeployment(request), expectedError); + const actualRequest = (client.innerApiCalls.createDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeployment with LRO error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.CreateDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.CreateDeploymentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeployment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createDeployment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateDeploymentProgress without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateDeploymentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateDeploymentProgress with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateDeploymentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateDeployment', () => { + it('invokes updateDeployment without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateDeploymentRequest() + ); + request.deployment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateDeploymentRequest', ['deployment', 'name']); + request.deployment.name = defaultValue1; + const expectedHeaderRequestParams = `deployment.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDeployment = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDeployment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeployment without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateDeploymentRequest() + ); + request.deployment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateDeploymentRequest', ['deployment', 'name']); + request.deployment.name = defaultValue1; + const expectedHeaderRequestParams = `deployment.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDeployment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDeployment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeployment with call error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateDeploymentRequest() + ); + request.deployment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateDeploymentRequest', ['deployment', 'name']); + request.deployment.name = defaultValue1; + const expectedHeaderRequestParams = `deployment.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeployment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateDeployment(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeployment with LRO error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateDeploymentRequest() + ); + request.deployment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateDeploymentRequest', ['deployment', 'name']); + request.deployment.name = defaultValue1; + const expectedHeaderRequestParams = `deployment.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeployment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateDeployment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDeploymentProgress without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateDeploymentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDeploymentProgress with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateDeploymentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteDeployment', () => { + it('invokes deleteDeployment without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeleteDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeleteDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDeployment = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteDeployment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDeployment without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeleteDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeleteDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDeployment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDeployment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDeployment with call error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeleteDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeleteDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDeployment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteDeployment(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDeployment with LRO error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeleteDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeleteDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDeployment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteDeployment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteDeploymentProgress without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteDeploymentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteDeploymentProgress with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteDeploymentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('lockDeployment', () => { + it('invokes lockDeployment without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.LockDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.LockDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.lockDeployment = stubLongRunningCall(expectedResponse); + const [operation] = await client.lockDeployment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.lockDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.lockDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes lockDeployment without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.LockDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.LockDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.lockDeployment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.lockDeployment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.lockDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.lockDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes lockDeployment with call error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.LockDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.LockDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.lockDeployment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.lockDeployment(request), expectedError); + const actualRequest = (client.innerApiCalls.lockDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.lockDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes lockDeployment with LRO error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.LockDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.LockDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.lockDeployment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.lockDeployment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.lockDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.lockDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkLockDeploymentProgress without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkLockDeploymentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkLockDeploymentProgress with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkLockDeploymentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('unlockDeployment', () => { + it('invokes unlockDeployment without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UnlockDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UnlockDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.unlockDeployment = stubLongRunningCall(expectedResponse); + const [operation] = await client.unlockDeployment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.unlockDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.unlockDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes unlockDeployment without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UnlockDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UnlockDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.unlockDeployment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.unlockDeployment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.unlockDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.unlockDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes unlockDeployment with call error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UnlockDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UnlockDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.unlockDeployment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.unlockDeployment(request), expectedError); + const actualRequest = (client.innerApiCalls.unlockDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.unlockDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes unlockDeployment with LRO error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UnlockDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UnlockDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.unlockDeployment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.unlockDeployment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.unlockDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.unlockDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUnlockDeploymentProgress without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUnlockDeploymentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUnlockDeploymentProgress with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUnlockDeploymentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createPreview', () => { + it('invokes createPreview without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.CreatePreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.CreatePreviewRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createPreview = stubLongRunningCall(expectedResponse); + const [operation] = await client.createPreview(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createPreview as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPreview as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPreview without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.CreatePreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.CreatePreviewRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createPreview = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createPreview( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createPreview as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPreview as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPreview with call error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.CreatePreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.CreatePreviewRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPreview = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createPreview(request), expectedError); + const actualRequest = (client.innerApiCalls.createPreview as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPreview as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPreview with LRO error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.CreatePreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.CreatePreviewRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPreview = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createPreview(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createPreview as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPreview as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreatePreviewProgress without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreatePreviewProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreatePreviewProgress with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreatePreviewProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deletePreview', () => { + it('invokes deletePreview without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeletePreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeletePreviewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePreview = stubLongRunningCall(expectedResponse); + const [operation] = await client.deletePreview(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePreview as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePreview as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePreview without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeletePreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeletePreviewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePreview = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePreview( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePreview as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePreview as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePreview with call error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeletePreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeletePreviewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePreview = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deletePreview(request), expectedError); + const actualRequest = (client.innerApiCalls.deletePreview as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePreview as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePreview with LRO error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.DeletePreviewRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.DeletePreviewRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePreview = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deletePreview(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deletePreview as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePreview as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeletePreviewProgress without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeletePreviewProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeletePreviewProgress with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeletePreviewProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateAutoMigrationConfig', () => { + it('invokes updateAutoMigrationConfig without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() + ); + request.autoMigrationConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); + request.autoMigrationConfig.name = defaultValue1; + const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAutoMigrationConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutoMigrationConfig without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() + ); + request.autoMigrationConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); + request.autoMigrationConfig.name = defaultValue1; + const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAutoMigrationConfig( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutoMigrationConfig with call error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() + ); + request.autoMigrationConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); + request.autoMigrationConfig.name = defaultValue1; + const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateAutoMigrationConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutoMigrationConfig with LRO error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() + ); + request.autoMigrationConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); + request.autoMigrationConfig.name = defaultValue1; + const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateAutoMigrationConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAutoMigrationConfigProgress without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateAutoMigrationConfigProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAutoMigrationConfigProgress with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateAutoMigrationConfigProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listDeployments', () => { + it('invokes listDeployments without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + ]; + client.innerApiCalls.listDeployments = stubSimpleCall(expectedResponse); + const [response] = await client.listDeployments(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDeployments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeployments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeployments without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + ]; + client.innerApiCalls.listDeployments = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDeployments( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IDeployment[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDeployments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeployments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeployments with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeployments = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDeployments(request), expectedError); + const actualRequest = (client.innerApiCalls.listDeployments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeployments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeploymentsStream without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + ]; + client.descriptors.page.listDeployments.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDeploymentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.Deployment[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.Deployment) => { + 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.listDeployments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDeployments, request)); + assert( + (client.descriptors.page.listDeployments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDeploymentsStream with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeployments.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDeploymentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.Deployment[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.Deployment) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDeployments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDeployments, request)); + assert( + (client.descriptors.page.listDeployments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDeployments without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), + ]; + client.descriptors.page.listDeployments.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.config.v1.IDeployment[] = []; + const iterable = client.listDeploymentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDeployments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDeployments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDeployments with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeployments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDeploymentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.config.v1.IDeployment[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDeployments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDeployments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listRevisions', () => { + it('invokes listRevisions without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListRevisionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + ]; + client.innerApiCalls.listRevisions = stubSimpleCall(expectedResponse); + const [response] = await client.listRevisions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRevisions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRevisions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRevisions without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListRevisionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + ]; + client.innerApiCalls.listRevisions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRevisions( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IRevision[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRevisions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRevisions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRevisions with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListRevisionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listRevisions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listRevisions(request), expectedError); + const actualRequest = (client.innerApiCalls.listRevisions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRevisions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRevisionsStream without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListRevisionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + ]; + client.descriptors.page.listRevisions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.Revision[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.Revision) => { + 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.listRevisions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRevisions, request)); + assert( + (client.descriptors.page.listRevisions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listRevisionsStream with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListRevisionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRevisions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.Revision[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.Revision) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listRevisions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRevisions, request)); + assert( + (client.descriptors.page.listRevisions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRevisions without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListRevisionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + generateSampleMessage(new protos.google.cloud.config.v1.Revision()), + ]; + client.descriptors.page.listRevisions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.config.v1.IRevision[] = []; + const iterable = client.listRevisionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listRevisions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRevisions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRevisions with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListRevisionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listRevisions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRevisionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.config.v1.IRevision[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listRevisions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRevisions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listResources', () => { + it('invokes listResources without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + ]; + client.innerApiCalls.listResources = stubSimpleCall(expectedResponse); + const [response] = await client.listResources(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listResources as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResources as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResources without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + ]; + client.innerApiCalls.listResources = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listResources( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IResource[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listResources as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResources as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResources with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listResources = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listResources(request), expectedError); + const actualRequest = (client.innerApiCalls.listResources as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResources as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourcesStream without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + ]; + client.descriptors.page.listResources.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listResourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.Resource[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.Resource) => { + 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.listResources.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listResources, request)); + assert( + (client.descriptors.page.listResources.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listResourcesStream with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listResources.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listResourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.Resource[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.Resource) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listResources.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listResources, request)); + assert( + (client.descriptors.page.listResources.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listResources without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + generateSampleMessage(new protos.google.cloud.config.v1.Resource()), + ]; + client.descriptors.page.listResources.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.config.v1.IResource[] = []; + const iterable = client.listResourcesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listResources.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listResources.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listResources with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listResources.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listResourcesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.config.v1.IResource[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listResources.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listResources.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listPreviews', () => { + it('invokes listPreviews without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListPreviewsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + ]; + client.innerApiCalls.listPreviews = stubSimpleCall(expectedResponse); + const [response] = await client.listPreviews(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPreviews as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPreviews as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPreviews without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListPreviewsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + ]; + client.innerApiCalls.listPreviews = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPreviews( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IPreview[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPreviews as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPreviews as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPreviews with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListPreviewsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPreviews = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listPreviews(request), expectedError); + const actualRequest = (client.innerApiCalls.listPreviews as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPreviews as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPreviewsStream without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListPreviewsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + ]; + client.descriptors.page.listPreviews.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listPreviewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.Preview[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.Preview) => { + 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.listPreviews.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPreviews, request)); + assert( + (client.descriptors.page.listPreviews.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPreviewsStream with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListPreviewsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPreviews.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listPreviewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.Preview[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.Preview) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listPreviews.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPreviews, request)); + assert( + (client.descriptors.page.listPreviews.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPreviews without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListPreviewsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + generateSampleMessage(new protos.google.cloud.config.v1.Preview()), + ]; + client.descriptors.page.listPreviews.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.config.v1.IPreview[] = []; + const iterable = client.listPreviewsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPreviews.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPreviews.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPreviews with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListPreviewsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPreviews.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPreviewsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.config.v1.IPreview[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPreviews.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPreviews.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listTerraformVersions', () => { + it('invokes listTerraformVersions without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListTerraformVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + ]; + client.innerApiCalls.listTerraformVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listTerraformVersions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTerraformVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTerraformVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTerraformVersions without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListTerraformVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + ]; + client.innerApiCalls.listTerraformVersions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTerraformVersions( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.ITerraformVersion[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTerraformVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTerraformVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTerraformVersions with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListTerraformVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTerraformVersions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listTerraformVersions(request), expectedError); + const actualRequest = (client.innerApiCalls.listTerraformVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTerraformVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTerraformVersionsStream without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListTerraformVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + ]; + client.descriptors.page.listTerraformVersions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listTerraformVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.TerraformVersion[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.TerraformVersion) => { + 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.listTerraformVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTerraformVersions, request)); + assert( + (client.descriptors.page.listTerraformVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listTerraformVersionsStream with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListTerraformVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listTerraformVersions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listTerraformVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.TerraformVersion[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.TerraformVersion) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listTerraformVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTerraformVersions, request)); + assert( + (client.descriptors.page.listTerraformVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTerraformVersions without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListTerraformVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), + ]; + client.descriptors.page.listTerraformVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.config.v1.ITerraformVersion[] = []; + const iterable = client.listTerraformVersionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTerraformVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTerraformVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTerraformVersions with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListTerraformVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listTerraformVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listTerraformVersionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.config.v1.ITerraformVersion[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTerraformVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTerraformVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listResourceChanges', () => { + it('invokes listResourceChanges without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceChangesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + ]; + client.innerApiCalls.listResourceChanges = stubSimpleCall(expectedResponse); + const [response] = await client.listResourceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceChanges without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceChangesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + ]; + client.innerApiCalls.listResourceChanges = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listResourceChanges( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceChange[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceChanges with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceChangesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listResourceChanges = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listResourceChanges(request), expectedError); + const actualRequest = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceChangesStream without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceChangesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + ]; + client.descriptors.page.listResourceChanges.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listResourceChangesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.ResourceChange[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.ResourceChange) => { + 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.listResourceChanges.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listResourceChanges, request)); + assert( + (client.descriptors.page.listResourceChanges.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listResourceChangesStream with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceChangesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listResourceChanges.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listResourceChangesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.ResourceChange[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.ResourceChange) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listResourceChanges.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listResourceChanges, request)); + assert( + (client.descriptors.page.listResourceChanges.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listResourceChanges without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceChangesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + ]; + client.descriptors.page.listResourceChanges.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.config.v1.IResourceChange[] = []; + const iterable = client.listResourceChangesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listResourceChanges with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceChangesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listResourceChanges.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listResourceChangesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.config.v1.IResourceChange[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listResourceDrifts', () => { + it('invokes listResourceDrifts without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + ]; + client.innerApiCalls.listResourceDrifts = stubSimpleCall(expectedResponse); + const [response] = await client.listResourceDrifts(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceDrifts without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + ]; + client.innerApiCalls.listResourceDrifts = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listResourceDrifts( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceDrift[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceDrifts with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listResourceDrifts = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listResourceDrifts(request), expectedError); + const actualRequest = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceDriftsStream without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + ]; + client.descriptors.page.listResourceDrifts.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listResourceDriftsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.ResourceDrift[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.ResourceDrift) => { + 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.listResourceDrifts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listResourceDrifts, request)); + assert( + (client.descriptors.page.listResourceDrifts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listResourceDriftsStream with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listResourceDrifts.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listResourceDriftsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.ResourceDrift[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.ResourceDrift) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listResourceDrifts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listResourceDrifts, request)); + assert( + (client.descriptors.page.listResourceDrifts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listResourceDrifts without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + ]; + client.descriptors.page.listResourceDrifts.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.config.v1.IResourceDrift[] = []; + const iterable = client.listResourceDriftsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listResourceDrifts with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listResourceDrifts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listResourceDriftsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.config.v1.IResourceDrift[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getIamPolicy(request, expectedOptions), expectedError); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.iamClient.setIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub) + .getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setIamPolicy(request, expectedOptions), expectedError); + assert((client.iamClient.setIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.iamClient.testIamPermissions as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + (err?: Error|null, result?: IamProtos.google.iam.v1.TestIamPermissionsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub) + .getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.testIamPermissions(request, expectedOptions), expectedError); + assert((client.iamClient.testIamPermissions as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('autoMigrationConfig', async () => { + const fakePath = "/rendered/path/autoMigrationConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.autoMigrationConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.autoMigrationConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('autoMigrationConfigPath', () => { + const result = client.autoMigrationConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.autoMigrationConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAutoMigrationConfigName', () => { + const result = client.matchProjectFromAutoMigrationConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.autoMigrationConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAutoMigrationConfigName', () => { + const result = client.matchLocationFromAutoMigrationConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.autoMigrationConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deployment', async () => { + const fakePath = "/rendered/path/deployment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + deployment: "deploymentValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deploymentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deploymentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deploymentPath', () => { + const result = client.deploymentPath("projectValue", "locationValue", "deploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deploymentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDeploymentName', () => { + const result = client.matchProjectFromDeploymentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDeploymentName', () => { + const result = client.matchLocationFromDeploymentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeploymentFromDeploymentName', () => { + const result = client.matchDeploymentFromDeploymentName(fakePath); + assert.strictEqual(result, "deploymentValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', async () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('preview', async () => { + const fakePath = "/rendered/path/preview"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + preview: "previewValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.previewPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.previewPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('previewPath', () => { + const result = client.previewPath("projectValue", "locationValue", "previewValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.previewPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPreviewName', () => { + const result = client.matchProjectFromPreviewName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.previewPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPreviewName', () => { + const result = client.matchLocationFromPreviewName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.previewPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPreviewFromPreviewName', () => { + const result = client.matchPreviewFromPreviewName(fakePath); + assert.strictEqual(result, "previewValue"); + assert((client.pathTemplates.previewPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('resource', async () => { + const fakePath = "/rendered/path/resource"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + deployment: "deploymentValue", + revision: "revisionValue", + resource: "resourceValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.resourcePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.resourcePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('resourcePath', () => { + const result = client.resourcePath("projectValue", "locationValue", "deploymentValue", "revisionValue", "resourceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.resourcePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromResourceName', () => { + const result = client.matchProjectFromResourceName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.resourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromResourceName', () => { + const result = client.matchLocationFromResourceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.resourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeploymentFromResourceName', () => { + const result = client.matchDeploymentFromResourceName(fakePath); + assert.strictEqual(result, "deploymentValue"); + assert((client.pathTemplates.resourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRevisionFromResourceName', () => { + const result = client.matchRevisionFromResourceName(fakePath); + assert.strictEqual(result, "revisionValue"); + assert((client.pathTemplates.resourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchResourceFromResourceName', () => { + const result = client.matchResourceFromResourceName(fakePath); + assert.strictEqual(result, "resourceValue"); + assert((client.pathTemplates.resourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('resourceChange', async () => { + const fakePath = "/rendered/path/resourceChange"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + preview: "previewValue", + resource_change: "resourceChangeValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.resourceChangePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.resourceChangePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('resourceChangePath', () => { + const result = client.resourceChangePath("projectValue", "locationValue", "previewValue", "resourceChangeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.resourceChangePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromResourceChangeName', () => { + const result = client.matchProjectFromResourceChangeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromResourceChangeName', () => { + const result = client.matchLocationFromResourceChangeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPreviewFromResourceChangeName', () => { + const result = client.matchPreviewFromResourceChangeName(fakePath); + assert.strictEqual(result, "previewValue"); + assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchResourceChangeFromResourceChangeName', () => { + const result = client.matchResourceChangeFromResourceChangeName(fakePath); + assert.strictEqual(result, "resourceChangeValue"); + assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('resourceDrift', async () => { + const fakePath = "/rendered/path/resourceDrift"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + preview: "previewValue", + resource_drift: "resourceDriftValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.resourceDriftPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.resourceDriftPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('resourceDriftPath', () => { + const result = client.resourceDriftPath("projectValue", "locationValue", "previewValue", "resourceDriftValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.resourceDriftPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromResourceDriftName', () => { + const result = client.matchProjectFromResourceDriftName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromResourceDriftName', () => { + const result = client.matchLocationFromResourceDriftName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPreviewFromResourceDriftName', () => { + const result = client.matchPreviewFromResourceDriftName(fakePath); + assert.strictEqual(result, "previewValue"); + assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchResourceDriftFromResourceDriftName', () => { + const result = client.matchResourceDriftFromResourceDriftName(fakePath); + assert.strictEqual(result, "resourceDriftValue"); + assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('revision', async () => { + const fakePath = "/rendered/path/revision"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + deployment: "deploymentValue", + revision: "revisionValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.revisionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.revisionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('revisionPath', () => { + const result = client.revisionPath("projectValue", "locationValue", "deploymentValue", "revisionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.revisionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromRevisionName', () => { + const result = client.matchProjectFromRevisionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.revisionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromRevisionName', () => { + const result = client.matchLocationFromRevisionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.revisionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeploymentFromRevisionName', () => { + const result = client.matchDeploymentFromRevisionName(fakePath); + assert.strictEqual(result, "deploymentValue"); + assert((client.pathTemplates.revisionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRevisionFromRevisionName', () => { + const result = client.matchRevisionFromRevisionName(fakePath); + assert.strictEqual(result, "revisionValue"); + assert((client.pathTemplates.revisionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('serviceAccount', async () => { + const fakePath = "/rendered/path/serviceAccount"; + const expectedParameters = { + project: "projectValue", + service_account: "serviceAccountValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.serviceAccountPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.serviceAccountPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('serviceAccountPath', () => { + const result = client.serviceAccountPath("projectValue", "serviceAccountValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.serviceAccountPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromServiceAccountName', () => { + const result = client.matchProjectFromServiceAccountName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.serviceAccountPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchServiceAccountFromServiceAccountName', () => { + const result = client.matchServiceAccountFromServiceAccountName(fakePath); + assert.strictEqual(result, "serviceAccountValue"); + assert((client.pathTemplates.serviceAccountPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('terraformVersion', async () => { + const fakePath = "/rendered/path/terraformVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + terraform_version: "terraformVersionValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.terraformVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.terraformVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('terraformVersionPath', () => { + const result = client.terraformVersionPath("projectValue", "locationValue", "terraformVersionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.terraformVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTerraformVersionName', () => { + const result = client.matchProjectFromTerraformVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.terraformVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTerraformVersionName', () => { + const result = client.matchLocationFromTerraformVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.terraformVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTerraformVersionFromTerraformVersionName', () => { + const result = client.matchTerraformVersionFromTerraformVersionName(fakePath); + assert.strictEqual(result, "terraformVersionValue"); + assert((client.pathTemplates.terraformVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('workerPool', async () => { + const fakePath = "/rendered/path/workerPool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + worker_pool: "workerPoolValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.workerPoolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.workerPoolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('workerPoolPath', () => { + const result = client.workerPoolPath("projectValue", "locationValue", "workerPoolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.workerPoolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromWorkerPoolName', () => { + const result = client.matchProjectFromWorkerPoolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.workerPoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromWorkerPoolName', () => { + const result = client.matchLocationFromWorkerPoolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.workerPoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWorkerPoolFromWorkerPoolName', () => { + const result = client.matchWorkerPoolFromWorkerPoolName(fakePath); + assert.strictEqual(result, "workerPoolValue"); + assert((client.pathTemplates.workerPoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-config/tsconfig.json b/owl-bot-staging/google-cloud-config/tsconfig.json new file mode 100644 index 00000000000..ca73e7bfc82 --- /dev/null +++ b/owl-bot-staging/google-cloud-config/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/owl-bot-staging/google-cloud-config/webpack.config.js b/owl-bot-staging/google-cloud-config/webpack.config.js new file mode 100644 index 00000000000..3f5cc816cee --- /dev/null +++ b/owl-bot-staging/google-cloud-config/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'Config', + filename: './config.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 1e441b11ba8b93cd9c5f44968d17ee2b6fefae8b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 10 Jan 2026 02:21:37 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-cloud-config/.OwlBot.yaml | 19 - .../google-cloud-config/.eslintignore | 7 - .../google-cloud-config/.eslintrc.json | 3 - .../google-cloud-config/.gitattributes | 4 - .../google-cloud-config/.gitignore | 14 - owl-bot-staging/google-cloud-config/.jsdoc.js | 55 - .../google-cloud-config/.mocharc.js | 33 - owl-bot-staging/google-cloud-config/.nycrc | 24 - .../google-cloud-config/.prettierignore | 6 - .../google-cloud-config/.prettierrc.js | 22 - .../google-cloud-config/CODE_OF_CONDUCT.md | 94 - .../google-cloud-config/CONTRIBUTING.md | 76 - owl-bot-staging/google-cloud-config/LICENSE | 202 - owl-bot-staging/google-cloud-config/README.md | 143 - .../google/cloud/config/v1/config.proto | 2356 - .../google-cloud-config/protos/protos.d.ts | 16568 ------ .../google-cloud-config/protos/protos.js | 43640 ---------------- .../google-cloud-config/protos/protos.json | 5103 -- .../generated/v1/config.create_deployment.js | 88 - .../generated/v1/config.create_preview.js | 86 - .../generated/v1/config.delete_deployment.js | 89 - .../generated/v1/config.delete_preview.js | 77 - .../generated/v1/config.delete_statefile.js | 68 - .../v1/config.export_deployment_statefile.js | 69 - .../generated/v1/config.export_lock_info.js | 62 - .../v1/config.export_preview_result.js | 63 - .../v1/config.export_revision_statefile.js | 63 - .../generated/v1/config.get_deployment.js | 62 - .../generated/v1/config.get_preview.js | 62 - .../generated/v1/config.get_resource.js | 62 - .../v1/config.get_resource_change.js | 63 - .../generated/v1/config.get_resource_drift.js | 63 - .../generated/v1/config.get_revision.js | 62 - .../v1/config.get_terraform_version.js | 62 - .../generated/v1/config.import_statefile.js | 73 - .../generated/v1/config.list_deployments.js | 101 - .../generated/v1/config.list_previews.js | 101 - .../v1/config.list_resource_changes.js | 97 - .../v1/config.list_resource_drifts.js | 97 - .../generated/v1/config.list_resources.js | 95 - .../generated/v1/config.list_revisions.js | 101 - .../v1/config.list_terraform_versions.js | 92 - .../generated/v1/config.lock_deployment.js | 63 - .../generated/v1/config.unlock_deployment.js | 68 - .../generated/v1/config.update_deployment.js | 87 - ...ippet_metadata_google.cloud.config.v1.json | 1359 - .../google-cloud-config/src/index.ts | 27 - .../src/v1/config_client.ts | 5673 -- .../src/v1/config_client_config.json | 183 - .../src/v1/config_proto_list.json | 3 - .../src/v1/gapic_metadata.json | 341 - .../google-cloud-config/src/v1/index.ts | 19 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../system-test/install.ts | 49 - .../test/gapic_config_v1.ts | 5966 --- .../google-cloud-config/tsconfig.json | 22 - .../google-cloud-config/webpack.config.js | 64 - packages/google-cloud-config/.jsdoc.js | 4 +- packages/google-cloud-config/.mocharc.js | 2 +- packages/google-cloud-config/.prettierrc.js | 2 +- packages/google-cloud-config/README.md | 2 + .../google/cloud/config/v1/config.proto | 81 +- .../google-cloud-config/protos/protos.d.ts | 362 +- packages/google-cloud-config/protos/protos.js | 790 +- .../google-cloud-config/protos/protos.json | 116 +- .../generated/v1/config.create_deployment.js | 2 +- .../generated/v1/config.create_preview.js | 2 +- .../generated/v1/config.delete_deployment.js | 2 +- .../generated/v1/config.delete_preview.js | 2 +- .../generated/v1/config.delete_statefile.js | 2 +- .../v1/config.export_deployment_statefile.js | 2 +- .../generated/v1/config.export_lock_info.js | 2 +- .../v1/config.export_preview_result.js | 2 +- .../v1/config.export_revision_statefile.js | 2 +- .../v1/config.get_auto_migration_config.js | 0 .../generated/v1/config.get_deployment.js | 2 +- .../generated/v1/config.get_preview.js | 2 +- .../generated/v1/config.get_resource.js | 2 +- .../v1/config.get_resource_change.js | 2 +- .../generated/v1/config.get_resource_drift.js | 2 +- .../generated/v1/config.get_revision.js | 2 +- .../v1/config.get_terraform_version.js | 2 +- .../generated/v1/config.import_statefile.js | 2 +- .../generated/v1/config.list_deployments.js | 2 +- .../generated/v1/config.list_previews.js | 2 +- .../v1/config.list_resource_changes.js | 2 +- .../v1/config.list_resource_drifts.js | 2 +- .../generated/v1/config.list_resources.js | 2 +- .../generated/v1/config.list_revisions.js | 2 +- .../v1/config.list_terraform_versions.js | 2 +- .../generated/v1/config.lock_deployment.js | 2 +- .../generated/v1/config.unlock_deployment.js | 2 +- .../v1/config.update_auto_migration_config.js | 0 .../generated/v1/config.update_deployment.js | 2 +- ...ippet_metadata_google.cloud.config.v1.json | 84 + .../src/v1/config_client.ts | 259 +- .../src/v1/config_client_config.json | 10 + .../src/v1/gapic_metadata.json | 20 + packages/google-cloud-config/src/v1/index.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../system-test/install.ts | 2 +- .../test/gapic_config_v1.ts | 306 +- 104 files changed, 2052 insertions(+), 84258 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-config/.OwlBot.yaml delete mode 100644 owl-bot-staging/google-cloud-config/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-config/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-config/.gitattributes delete mode 100644 owl-bot-staging/google-cloud-config/.gitignore delete mode 100644 owl-bot-staging/google-cloud-config/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-config/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-config/.nycrc delete mode 100644 owl-bot-staging/google-cloud-config/.prettierignore delete mode 100644 owl-bot-staging/google-cloud-config/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-config/CODE_OF_CONDUCT.md delete mode 100644 owl-bot-staging/google-cloud-config/CONTRIBUTING.md delete mode 100644 owl-bot-staging/google-cloud-config/LICENSE delete mode 100644 owl-bot-staging/google-cloud-config/README.md delete mode 100644 owl-bot-staging/google-cloud-config/protos/google/cloud/config/v1/config.proto delete mode 100644 owl-bot-staging/google-cloud-config/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-config/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-config/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_deployment.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_preview.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_deployment.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_preview.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_statefile.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_lock_info.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_preview_result.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_deployment.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_preview.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_change.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_drift.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_revision.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_terraform_version.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.import_statefile.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_deployments.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_previews.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_changes.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resources.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_revisions.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.lock_deployment.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.unlock_deployment.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_deployment.js delete mode 100644 owl-bot-staging/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json delete mode 100644 owl-bot-staging/google-cloud-config/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-config/src/v1/config_client.ts delete mode 100644 owl-bot-staging/google-cloud-config/src/v1/config_client_config.json delete mode 100644 owl-bot-staging/google-cloud-config/src/v1/config_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-config/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-config/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-config/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-config/test/gapic_config_v1.ts delete mode 100644 owl-bot-staging/google-cloud-config/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-config/webpack.config.js rename {owl-bot-staging => packages}/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js (100%) rename {owl-bot-staging => packages}/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js (100%) diff --git a/owl-bot-staging/google-cloud-config/.OwlBot.yaml b/owl-bot-staging/google-cloud-config/.OwlBot.yaml deleted file mode 100644 index 5afb0c11e0e..00000000000 --- a/owl-bot-staging/google-cloud-config/.OwlBot.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this 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. - -deep-copy-regex: - - source: /google/cloud/config/google-cloud-config-nodejs - dest: /owl-bot-staging/google-cloud-config - -api-name: config \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/.eslintignore b/owl-bot-staging/google-cloud-config/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-config/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-cloud-config/.eslintrc.json b/owl-bot-staging/google-cloud-config/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-config/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-config/.gitattributes b/owl-bot-staging/google-cloud-config/.gitattributes deleted file mode 100644 index 33739cb74e4..00000000000 --- a/owl-bot-staging/google-cloud-config/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -*.ts text eol=lf -*.js text eol=lf -protos/* linguist-generated -**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/owl-bot-staging/google-cloud-config/.gitignore b/owl-bot-staging/google-cloud-config/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-config/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.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/owl-bot-staging/google-cloud-config/.jsdoc.js b/owl-bot-staging/google-cloud-config/.jsdoc.js deleted file mode 100644 index a73893518ad..00000000000 --- a/owl-bot-staging/google-cloud-config/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -module.exports = { - opts: { - readme: './README.md', - package: './package.json', - template: './node_modules/jsdoc-fresh', - recurse: true, - verbose: true, - destination: './docs/' - }, - plugins: [ - 'plugins/markdown', - 'jsdoc-region-tag' - ], - source: { - excludePattern: '(^|\\/|\\\\)[._]', - include: [ - 'build/src', - 'protos' - ], - includePattern: '\\.js$' - }, - templates: { - copyright: 'Copyright 2026 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/config', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-config/.mocharc.js b/owl-bot-staging/google-cloud-config/.mocharc.js deleted file mode 100644 index 5eb34e86c87..00000000000 --- a/owl-bot-staging/google-cloud-config/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - -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 diff --git a/owl-bot-staging/google-cloud-config/.nycrc b/owl-bot-staging/google-cloud-config/.nycrc deleted file mode 100644 index 81a95fc94b0..00000000000 --- a/owl-bot-staging/google-cloud-config/.nycrc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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 -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/.prettierignore b/owl-bot-staging/google-cloud-config/.prettierignore deleted file mode 100644 index 9340ad9b86d..00000000000 --- a/owl-bot-staging/google-cloud-config/.prettierignore +++ /dev/null @@ -1,6 +0,0 @@ -**/node_modules -**/coverage -test/fixtures -build/ -docs/ -protos/ diff --git a/owl-bot-staging/google-cloud-config/.prettierrc.js b/owl-bot-staging/google-cloud-config/.prettierrc.js deleted file mode 100644 index 7649ee3c254..00000000000 --- a/owl-bot-staging/google-cloud-config/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-cloud-config/CODE_OF_CONDUCT.md b/owl-bot-staging/google-cloud-config/CODE_OF_CONDUCT.md deleted file mode 100644 index 2add2547a81..00000000000 --- a/owl-bot-staging/google-cloud-config/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,94 +0,0 @@ - -# Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of -experience, education, socio-economic status, nationality, personal appearance, -race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, or to ban temporarily or permanently any -contributor for other behaviors that they deem inappropriate, threatening, -offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -This Code of Conduct also applies outside the project spaces when the Project -Steward has a reasonable belief that an individual's behavior may have a -negative impact on the project or its community. - -## Conflict Resolution - -We do not believe that all conflict is bad; healthy debate and disagreement -often yield positive results. However, it is never okay to be disrespectful or -to engage in behavior that violates the project’s code of conduct. - -If you see someone violating the code of conduct, you are encouraged to address -the behavior directly with those involved. Many issues can be resolved quickly -and easily, and this gives people more control over the outcome of their -dispute. If you are unable to resolve the matter for any reason, or if the -behavior is threatening or harassing, report it. We are dedicated to providing -an environment where participants feel welcome and safe. - -Reports should be directed to *googleapis-stewards@google.com*, the -Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to -receive and address reported violations of the code of conduct. They will then -work with a committee consisting of representatives from the Open Source -Programs Office and the Google Open Source Strategy team. If for any reason you -are uncomfortable reaching out to the Project Steward, please email -opensource@google.com. - -We will investigate every complaint, but you may not receive a direct response. -We will use our discretion in determining when and how to follow up on reported -incidents, which may range from not taking action to permanent expulsion from -the project and project-sponsored spaces. We will notify the accused of the -report and provide them an opportunity to discuss it before any action is taken. -The identity of the reporter will be omitted from the details of the report -supplied to the accused. In potentially harmful situations, such as ongoing -harassment or threats to anyone's safety, we may take action without notice. - -## Attribution - -This Code of Conduct is adapted from the Contributor Covenant, version 1.4, -available at -https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/CONTRIBUTING.md b/owl-bot-staging/google-cloud-config/CONTRIBUTING.md deleted file mode 100644 index 3cbe099169f..00000000000 --- a/owl-bot-staging/google-cloud-config/CONTRIBUTING.md +++ /dev/null @@ -1,76 +0,0 @@ -# How to become a contributor and submit your own code - -**Table of contents** - -* [Contributor License Agreements](#contributor-license-agreements) -* [Contributing a patch](#contributing-a-patch) -* [Running the tests](#running-the-tests) -* [Releasing the library](#releasing-the-library) - -## Contributor License Agreements - -We'd love to accept your sample apps and patches! Before we can take them, we -have to jump a couple of legal hurdles. - -Please fill out either the individual or corporate Contributor License Agreement -(CLA). - - * If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). - * If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). - -Follow either of the two links above to access the appropriate CLA and -instructions for how to sign and return it. Once we receive it, we'll be able to -accept your pull requests. - -## Contributing A Patch - -1. Submit an issue describing your proposed change to the repo in question. -1. The repo owner will respond to your issue promptly. -1. If your proposed change is accepted, and you haven't already done so, sign a - Contributor License Agreement (see details above). -1. Fork the desired repo, develop and test your code changes. -1. Ensure that your code adheres to the existing style in the code to which - you are contributing. -1. Ensure that your code has an appropriate set of tests which all pass. -1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. -1. Submit a pull request. - -### Before you begin - -1. [Select or create a Cloud Platform project][projects]. -1. [Enable billing for your project][billing]. -1. [Enable the Config API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the - API from your local workstation. - - -## Running the tests - -1. [Prepare your environment for Node.js setup][setup]. - -1. Install dependencies: - - npm install - -1. Run the tests: - - # Run unit tests. - npm test - - # Run sample integration tests. - npm run samples-test - - # Run all system tests. - npm run system-test - -1. Lint (and maybe fix) any changes: - - npm run fix - -[setup]: https://cloud.google.com/nodejs/docs/setup -[projects]: https://console.cloud.google.com/project -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=config.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/LICENSE b/owl-bot-staging/google-cloud-config/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/owl-bot-staging/google-cloud-config/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/owl-bot-staging/google-cloud-config/README.md b/owl-bot-staging/google-cloud-config/README.md deleted file mode 100644 index 9c68b737b98..00000000000 --- a/owl-bot-staging/google-cloud-config/README.md +++ /dev/null @@ -1,143 +0,0 @@ -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "The comments you see below are used to generate those parts of the template in later states." -Google Cloud Platform logo - -# [Infrastructure Manager API: Nodejs Client][homepage] - -This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways -unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **stable** libraries -are addressed with the highest priority - -[![npm version](https://img.shields.io/npm/v/@google-cloud/config.svg)](https://www.npmjs.org/package/@google-cloud/config) - -Infrastructure Manager API client for Node.js - -[//]: # "partials.introduction" - -A comprehensive list of changes in each version may be found in -[the CHANGELOG][homepage_changelog]. - -* [Infrastructure Manager API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/config/latest) -* [Infrastructure Manager API Documentation](https://cloud.google.com/infrastructure-manager/docs/overview) - -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 Infrastructure Manager API API][enable_api]. -1. [Set up authentication][auth] so you can access the - API from your local workstation. -### Installing the client library - -```bash -npm install @google-cloud/config -``` - -[//]: # "partials.body" - -## Samples - -Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. - -| Sample | Source Code | -| --------------------------- | --------------------------------- | -| create deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.create_deployment.js) | -| create preview | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.create_preview.js) | -| delete deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.delete_deployment.js) | -| delete preview | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.delete_preview.js) | -| delete statefile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.delete_statefile.js) | -| export deployment statefile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js) | -| export lock info | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.export_lock_info.js) | -| export preview result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.export_preview_result.js) | -| export revision statefile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js) | -| get auto migration config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js) | -| get deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_deployment.js) | -| get preview | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_preview.js) | -| get resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource.js) | -| get resource change | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js) | -| get resource drift | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js) | -| get revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_revision.js) | -| get terraform version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_terraform_version.js) | -| import statefile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.import_statefile.js) | -| list deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_deployments.js) | -| list previews | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_previews.js) | -| list resource changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js) | -| list resource drifts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js) | -| list resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resources.js) | -| list revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_revisions.js) | -| list terraform versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js) | -| lock deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.lock_deployment.js) | -| unlock deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.unlock_deployment.js) | -| update auto migration config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js) | -| update deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.update_deployment.js) | -| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json) | - - -## Supported Node.js Versions - -Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). -Libraries are compatible with all current _active_ and _maintenance_ versions of -Node.js. -If you are using an end-of-life version of Node.js, we recommend that you update -as soon as possible to an actively supported LTS version. - -Google's client libraries support legacy versions of Node.js runtimes on a -best-efforts basis with the following warnings: - -* Legacy versions are not tested in continuous integration. -* Some security patches and features cannot be backported. -* Dependencies cannot be kept up-to-date. - -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. -For example, `npm install @google-cloud/config@legacy-8` installs client libraries -for versions compatible with Node.js 8. - -## Versioning - -This library follows [Semantic Versioning](http://semver.org/). - -More Information: [Google Cloud Platform Launch Stages][launch_stages] - -[launch_stages]: https://cloud.google.com/terms/launch-stages - -## Contributing - -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/CONTRIBUTING.md). - -Please note that this `README.md` -and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) -are generated from a central template. - -## License - -Apache Version 2.0 - -See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/LICENSE) - -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[projects]: https://console.cloud.google.com/project -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=config.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local -[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples -[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/CHANGELOG.md -[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config diff --git a/owl-bot-staging/google-cloud-config/protos/google/cloud/config/v1/config.proto b/owl-bot-staging/google-cloud-config/protos/google/cloud/config/v1/config.proto deleted file mode 100644 index c45d7e95e38..00000000000 --- a/owl-bot-staging/google-cloud-config/protos/google/cloud/config/v1/config.proto +++ /dev/null @@ -1,2356 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.config.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.Config.V1"; -option go_package = "cloud.google.com/go/config/apiv1/configpb;configpb"; -option java_multiple_files = true; -option java_outer_classname = "ConfigProto"; -option java_package = "com.google.cloud.config.v1"; -option php_namespace = "Google\\Cloud\\Config\\V1"; -option ruby_package = "Google::Cloud::ConfigService::V1"; -option (google.api.resource_definition) = { - type: "iam.googleapis.com/ServiceAccount" - pattern: "projects/{project}/serviceAccounts/{service_account}" -}; -option (google.api.resource_definition) = { - type: "cloudbuild.googleapis.com/WorkerPool" - pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}" -}; - -// Infrastructure Manager is a managed service that automates the deployment and -// management of Google Cloud infrastructure resources. -service Config { - option (google.api.default_host) = "config.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project - // and location. - rpc ListDeployments(ListDeploymentsRequest) - returns (ListDeploymentsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/deployments" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details about a [Deployment][google.cloud.config.v1.Deployment]. - rpc GetDeployment(GetDeploymentRequest) returns (Deployment) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/deployments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a [Deployment][google.cloud.config.v1.Deployment]. - rpc CreateDeployment(CreateDeploymentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/deployments" - body: "deployment" - }; - option (google.api.method_signature) = "parent,deployment,deployment_id"; - option (google.longrunning.operation_info) = { - response_type: "Deployment" - metadata_type: "OperationMetadata" - }; - } - - // Updates a [Deployment][google.cloud.config.v1.Deployment]. - rpc UpdateDeployment(UpdateDeploymentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{deployment.name=projects/*/locations/*/deployments/*}" - body: "deployment" - }; - option (google.api.method_signature) = "deployment,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Deployment" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a [Deployment][google.cloud.config.v1.Deployment]. - rpc DeleteDeployment(DeleteDeploymentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/deployments/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "Deployment" - metadata_type: "OperationMetadata" - }; - } - - // Lists [Revision][google.cloud.config.v1.Revision]s of a deployment. - rpc ListRevisions(ListRevisionsRequest) returns (ListRevisionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/deployments/*}/revisions" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details about a [Revision][google.cloud.config.v1.Revision]. - rpc GetRevision(GetRevisionRequest) returns (Revision) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/deployments/*/revisions/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Gets details about a [Resource][google.cloud.config.v1.Resource] deployed - // by Infra Manager. - rpc GetResource(GetResourceRequest) returns (Resource) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists [Resources][google.cloud.config.v1.Resource] in a given revision. - rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources" - }; - option (google.api.method_signature) = "parent"; - } - - // Exports Terraform state file from a given deployment. - rpc ExportDeploymentStatefile(ExportDeploymentStatefileRequest) - returns (Statefile) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/deployments/*}:exportState" - body: "*" - }; - } - - // Exports Terraform state file from a given revision. - rpc ExportRevisionStatefile(ExportRevisionStatefileRequest) - returns (Statefile) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState" - body: "*" - }; - } - - // Imports Terraform state file in a given deployment. The state file does not - // take effect until the Deployment has been unlocked. - rpc ImportStatefile(ImportStatefileRequest) returns (Statefile) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/deployments/*}:importState" - body: "*" - }; - option (google.api.method_signature) = "parent,lock_id"; - } - - // Deletes Terraform state file in a given deployment. - rpc DeleteStatefile(DeleteStatefileRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/deployments/*}:deleteState" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Locks a deployment. - rpc LockDeployment(LockDeploymentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/deployments/*}:lock" - body: "*" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "Deployment" - metadata_type: "OperationMetadata" - }; - } - - // Unlocks a locked deployment. - rpc UnlockDeployment(UnlockDeploymentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/deployments/*}:unlock" - body: "*" - }; - option (google.api.method_signature) = "name,lock_id"; - option (google.longrunning.operation_info) = { - response_type: "Deployment" - metadata_type: "OperationMetadata" - }; - } - - // Exports the lock info on a locked deployment. - rpc ExportLockInfo(ExportLockInfoRequest) returns (LockInfo) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/deployments/*}:exportLock" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a [Preview][google.cloud.config.v1.Preview]. - rpc CreatePreview(CreatePreviewRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/previews" - body: "preview" - }; - option (google.api.method_signature) = "parent,preview"; - option (google.longrunning.operation_info) = { - response_type: "Preview" - metadata_type: "OperationMetadata" - }; - } - - // Gets details about a [Preview][google.cloud.config.v1.Preview]. - rpc GetPreview(GetPreviewRequest) returns (Preview) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/previews/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists [Preview][google.cloud.config.v1.Preview]s in a given project and - // location. - rpc ListPreviews(ListPreviewsRequest) returns (ListPreviewsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/previews" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a [Preview][google.cloud.config.v1.Preview]. - rpc DeletePreview(DeletePreviewRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/previews/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "Preview" - metadata_type: "OperationMetadata" - }; - } - - // Export [Preview][google.cloud.config.v1.Preview] results. - rpc ExportPreviewResult(ExportPreviewResultRequest) - returns (ExportPreviewResultResponse) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/previews/*}:export" - body: "*" - }; - } - - // Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a - // given project and location. - rpc ListTerraformVersions(ListTerraformVersionsRequest) - returns (ListTerraformVersionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/terraformVersions" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details about a - // [TerraformVersion][google.cloud.config.v1.TerraformVersion]. - rpc GetTerraformVersion(GetTerraformVersionRequest) - returns (TerraformVersion) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/terraformVersions/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists ResourceChanges for a given preview. - rpc ListResourceChanges(ListResourceChangesRequest) - returns (ListResourceChangesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/previews/*}/resourceChanges" - }; - option (google.api.method_signature) = "parent"; - } - - // Get a ResourceChange for a given preview. - rpc GetResourceChange(GetResourceChangeRequest) returns (ResourceChange) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/previews/*/resourceChanges/*}" - }; - option (google.api.method_signature) = "name"; - } - - // List ResourceDrifts for a given preview. - rpc ListResourceDrifts(ListResourceDriftsRequest) - returns (ListResourceDriftsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/previews/*}/resourceDrifts" - }; - option (google.api.method_signature) = "parent"; - } - - // Get a ResourceDrift for a given preview. - rpc GetResourceDrift(GetResourceDriftRequest) returns (ResourceDrift) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/previews/*/resourceDrifts/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Get the AutoMigrationConfig for a given project and location. - rpc GetAutoMigrationConfig(GetAutoMigrationConfigRequest) - returns (AutoMigrationConfig) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/autoMigrationConfig}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the AutoMigrationConfig for a given project and location. - rpc UpdateAutoMigrationConfig(UpdateAutoMigrationConfigRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{auto_migration_config.name=projects/*/locations/*/autoMigrationConfig}" - body: "auto_migration_config" - }; - option (google.api.method_signature) = "auto_migration_config,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "AutoMigrationConfig" - metadata_type: "OperationMetadata" - }; - } -} - -// Enum values to control quota checks for resources in terraform -// configuration files. -enum QuotaValidation { - // The default value. - // QuotaValidation on terraform configuration files will be disabled in - // this case. - QUOTA_VALIDATION_UNSPECIFIED = 0; - - // Enable computing quotas for resources in terraform configuration files to - // get visibility on resources with insufficient quotas. - ENABLED = 1; - - // Enforce quota checks so deployment fails if there isn't sufficient quotas - // available to deploy resources in terraform configuration files. - ENFORCED = 2; -} - -// A Deployment is a group of resources and configs managed and provisioned by -// Infra Manager. -message Deployment { - option (google.api.resource) = { - type: "config.googleapis.com/Deployment" - pattern: "projects/{project}/locations/{location}/deployments/{deployment}" - }; - - // Possible states of a deployment. - enum State { - // The default value. This value is used if the state is omitted. - STATE_UNSPECIFIED = 0; - - // The deployment is being created. - CREATING = 1; - - // The deployment is healthy. - ACTIVE = 2; - - // The deployment is being updated. - UPDATING = 3; - - // The deployment is being deleted. - DELETING = 4; - - // The deployment has encountered an unexpected error. - FAILED = 5; - - // The deployment is no longer being actively reconciled. - // This may be the result of recovering the project after deletion. - SUSPENDED = 6; - - // The deployment has been deleted. - DELETED = 7; - } - - // Possible errors that can occur with deployments. - enum ErrorCode { - // No error code was specified. - ERROR_CODE_UNSPECIFIED = 0; - - // The revision failed. See Revision for more details. - REVISION_FAILED = 1; - - // Cloud Build failed due to a permission issue. - CLOUD_BUILD_PERMISSION_DENIED = 3; - - // Cloud Build job associated with a deployment deletion could not be - // started. - DELETE_BUILD_API_FAILED = 5; - - // Cloud Build job associated with a deployment deletion was started but - // failed. - DELETE_BUILD_RUN_FAILED = 6; - - // Cloud Storage bucket creation failed due to a permission issue. - BUCKET_CREATION_PERMISSION_DENIED = 7; - - // Cloud Storage bucket creation failed due to an issue unrelated to - // permissions. - BUCKET_CREATION_FAILED = 8; - - // Failed to import values from an external source. - EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 10; - } - - // Possible lock states of a deployment. - enum LockState { - // The default value. This value is used if the lock state is omitted. - LOCK_STATE_UNSPECIFIED = 0; - - // The deployment is locked. - LOCKED = 1; - - // The deployment is unlocked. - UNLOCKED = 2; - - // The deployment is being locked. - LOCKING = 3; - - // The deployment is being unlocked. - UNLOCKING = 4; - - // The deployment has failed to lock. - LOCK_FAILED = 5; - - // The deployment has failed to unlock. - UNLOCK_FAILED = 6; - } - - // Blueprint to deploy. - oneof blueprint { - // A blueprint described using Terraform's HashiCorp Configuration Language - // as a root module. - TerraformBlueprint terraform_blueprint = 6; - } - - // Identifier. Resource name of the deployment. - // Format: `projects/{project}/locations/{location}/deployments/{deployment}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. Time when the deployment was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time when the deployment was last modified. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User-defined metadata for the deployment. - map labels = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Current state of the deployment. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Revision name that was most recently applied. - // Format: `projects/{project}/locations/{location}/deployments/{deployment}/ - // revisions/{revision}` - string latest_revision = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information regarding the current state. - string state_detail = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Error code describing errors that may have occurred. - ErrorCode error_code = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Location of artifacts from a DeleteDeployment operation. - ApplyResults delete_results = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Cloud Build instance UUID associated with deleting this - // deployment. - string delete_build = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Location of Cloud Build logs in Google Cloud Storage, - // populated when deleting this deployment. Format: `gs://{bucket}/{object}`. - string delete_logs = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Errors encountered when deleting this deployment. - // Errors are truncated to 10 entries, see `delete_results` and `error_logs` - // for full details. - repeated TerraformError tf_errors = 13 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Location of Terraform error logs in Google Cloud Storage. - // Format: `gs://{bucket}/{object}`. - string error_logs = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User-defined location of Cloud Build logs and artifacts in Google - // Cloud Storage. Format: `gs://{bucket}/{folder}` - // - // A default bucket will be bootstrapped if the field is not set or empty. - // Default bucket format: `gs://--blueprint-config` - // Constraints: - // - The bucket needs to be in the same project as the deployment - // - The path cannot be within the path of `gcs_source` - // - The field cannot be updated, including changing its presence - optional string artifacts_gcs_bucket = 15 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. User-specified Service Account (SA) credentials to be used when - // actuating resources. - // Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` - optional string service_account = 16 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "iam.googleapis.com/ServiceAccount" - } - ]; - - // By default, Infra Manager will return a failure when - // Terraform encounters a 409 code (resource conflict error) during actuation. - // If this flag is set to true, Infra Manager will instead - // attempt to automatically import the resource into the Terraform state (for - // supported resource types) and continue actuation. - // - // Not all resource types are supported, refer to documentation. - optional bool import_existing_resources = 17; - - // Optional. The user-specified Cloud Build worker pool resource in which the - // Cloud Build job will execute. Format: - // `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. - // If this field is unspecified, the default Cloud Build worker pool will be - // used. - optional string worker_pool = 19 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "cloudbuild.googleapis.com/WorkerPool" - } - ]; - - // Output only. Current lock state of the deployment. - LockState lock_state = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The user-specified Terraform version constraint. - // Example: "=1.3.10". - optional string tf_version_constraint = 21 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The current Terraform version set on the deployment. - // It is in the format of "Major.Minor.Patch", for example, "1.3.10". - string tf_version = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Input to control quota checks for resources in terraform - // configuration files. There are limited resources on which quota validation - // applies. - QuotaValidation quota_validation = 23 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Arbitrary key-value metadata storage e.g. to help client tools - // identify deployments during automation. See - // https://google.aip.dev/148#annotations for details on format and size - // limitations. - map annotations = 24 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. This field specifies the provider configurations. - ProviderConfig provider_config = 25 [(google.api.field_behavior) = OPTIONAL]; -} - -// TerraformBlueprint describes the source of a Terraform root module which -// describes the resources and configs to be deployed. -message TerraformBlueprint { - // Location of the source configs. - // Required. - oneof source { - // URI of an object in Google Cloud Storage. - // Format: `gs://{bucket}/{object}` - // - // URI may also specify an object version for zipped objects. - // Format: `gs://{bucket}/{object}#{version}` - string gcs_source = 1; - - // URI of a public Git repo. - GitSource git_source = 2; - } - - // Optional. Input variable values for the Terraform blueprint. - map input_values = 4 - [(google.api.field_behavior) = OPTIONAL]; -} - -// A Terraform input variable. -message TerraformVariable { - // Optional. Input variable value. - google.protobuf.Value input_value = 5 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Outputs and artifacts from applying a deployment. -message ApplyResults { - // Location of a blueprint copy and other manifests in Google Cloud Storage. - // Format: `gs://{bucket}/{object}` - string content = 1; - - // Location of artifacts (e.g. logs) in Google Cloud Storage. - // Format: `gs://{bucket}/{object}` - string artifacts = 2; - - // Map of output name to output info. - map outputs = 3; -} - -// Describes a Terraform output. -message TerraformOutput { - // Identifies whether Terraform has set this output as a potential - // sensitive value. - bool sensitive = 1; - - // Value of output. - google.protobuf.Value value = 2; -} - -message ListDeploymentsRequest { - // Required. The parent in whose context the Deployments are listed. The - // parent value is in the format: - // 'projects/{project_id}/locations/{location}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // When requesting a page of resources, 'page_size' specifies number of - // resources to return. If unspecified, at most 500 will be returned. The - // maximum value is 1000. - int32 page_size = 2; - - // Token returned by previous call to 'ListDeployments' which specifies the - // position in the list from where to continue listing the resources. - string page_token = 3; - - // Lists the Deployments that match the filter expression. A filter - // expression filters the resources listed in the response. The expression - // must be of the form '{field} {operator} {value}' where operators: '<', '>', - // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - // operator which is roughly synonymous with equality). {field} can refer to a - // proto or JSON field, or a synthetic field. Field names can be camelCase or - // snake_case. - // - // Examples: - // - Filter by name: - // name = "projects/foo/locations/us-central1/deployments/bar - // - // - Filter by labels: - // - Resources that have a key called 'foo' - // labels.foo:* - // - Resources that have a key called 'foo' whose value is 'bar' - // labels.foo = bar - // - // - Filter by state: - // - Deployments in CREATING state. - // state=CREATING - string filter = 4; - - // Field to use to sort the list. - string order_by = 5; -} - -message ListDeploymentsResponse { - // List of [Deployment][google.cloud.config.v1.Deployment]s. - repeated Deployment deployments = 1; - - // Token to be supplied to the next ListDeployments request via `page_token` - // to obtain the next set of results. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -message GetDeploymentRequest { - // Required. The name of the deployment. Format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/Deployment" - } - ]; -} - -// A request to list Revisions passed to a 'ListRevisions' call. -message ListRevisionsRequest { - // Required. The parent in whose context the Revisions are listed. The parent - // value is in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/Deployment" - } - ]; - - // When requesting a page of resources, `page_size` specifies number of - // resources to return. If unspecified, at most 500 will be returned. The - // maximum value is 1000. - int32 page_size = 2; - - // Token returned by previous call to 'ListRevisions' which specifies the - // position in the list from where to continue listing the resources. - string page_token = 3; - - // Lists the Revisions that match the filter expression. A filter - // expression filters the resources listed in the response. The expression - // must be of the form '{field} {operator} {value}' where operators: '<', '>', - // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - // operator which is roughly synonymous with equality). {field} can refer to a - // proto or JSON field, or a synthetic field. Field names can be camelCase or - // snake_case. - // - // Examples: - // - Filter by name: - // name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar - // - // - Filter by labels: - // - Resources that have a key called 'foo' - // labels.foo:* - // - Resources that have a key called 'foo' whose value is 'bar' - // labels.foo = bar - // - // - Filter by state: - // - Revisions in CREATING state. - // state=CREATING - string filter = 4; - - // Field to use to sort the list. - string order_by = 5; -} - -// A response to a 'ListRevisions' call. Contains a list of Revisions. -message ListRevisionsResponse { - // List of [Revision][google.cloud.config.v1.Revision]s. - repeated Revision revisions = 1; - - // A token to request the next page of resources from the 'ListRevisions' - // method. The value of an empty string means that there are no more resources - // to return. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// A request to get a Revision from a 'GetRevision' call. -message GetRevisionRequest { - // Required. The name of the Revision in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } - ]; -} - -message CreateDeploymentRequest { - // Required. The parent in whose context the Deployment is created. The parent - // value is in the format: 'projects/{project_id}/locations/{location}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The Deployment ID. - string deployment_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. [Deployment][google.cloud.config.v1.Deployment] resource to be - // created. - Deployment deployment = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional request ID to identify requests. Specify a unique - // request ID so that if you must retry your request, the server will know to - // ignore the request if it has already been completed. The server will - // guarantee that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -message UpdateDeploymentRequest { - // Optional. Field mask used to specify the fields to be overwritten in the - // Deployment resource by the update. - // - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it is in the mask. If the - // user does not provide a mask then all fields will be overwritten. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. [Deployment][google.cloud.config.v1.Deployment] to update. - // - // The deployment's `name` field is used to identify the resource to be - // updated. Format: - // `projects/{project}/locations/{location}/deployments/{deployment}` - Deployment deployment = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional request ID to identify requests. Specify a unique - // request ID so that if you must retry your request, the server will know to - // ignore the request if it has already been completed. The server will - // guarantee that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -message DeleteDeploymentRequest { - // Policy on how resources actuated by the deployment should be deleted. - enum DeletePolicy { - // Unspecified policy, resources will be deleted. - DELETE_POLICY_UNSPECIFIED = 0; - - // Deletes resources actuated by the deployment. - DELETE = 1; - - // Abandons resources and only deletes the deployment and its metadata. - ABANDON = 2; - } - - // Required. The name of the Deployment in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/Deployment" - } - ]; - - // Optional. An optional request ID to identify requests. Specify a unique - // request ID so that if you must retry your request, the server will know to - // ignore the request if it has already been completed. The server will - // guarantee that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, any revisions for this deployment will also be - // deleted. (Otherwise, the request will only work if the deployment has no - // revisions.) - bool force = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Policy on how resources actuated by the deployment should be - // deleted. If unspecified, the default behavior is to delete the underlying - // resources. - DeletePolicy delete_policy = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Represents the metadata of the long-running operation. -message OperationMetadata { - // Ephemeral metadata about the state of an operation for a particular - // resource. - oneof resource_metadata { - // Output only. Metadata about the deployment operation state. - DeploymentOperationMetadata deployment_metadata = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Metadata about the preview operation state. - PreviewOperationMetadata preview_metadata = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. Time when the operation was created. - google.protobuf.Timestamp create_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time when the operation finished running. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined resource path for the target of the operation. - string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the verb executed by the operation. - string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Human-readable status of the operation, if any. - string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Identifies whether the user has requested cancellation of the - // operation. Operations that have successfully been cancelled have - // [google.longrunning.Operation.error][google.longrunning.Operation.error] - // value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, - // corresponding to `Code.CANCELLED`. - bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. API version used to start the operation. - string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A child resource of a Deployment generated by a 'CreateDeployment' or -// 'UpdateDeployment' call. Each Revision contains metadata pertaining to a -// snapshot of a particular Deployment. -message Revision { - option (google.api.resource) = { - type: "config.googleapis.com/Revision" - pattern: "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}" - }; - - // Actions that generate a revision. - enum Action { - // The default value. This value is used if the action is omitted. - ACTION_UNSPECIFIED = 0; - - // The revision was generated by creating a deployment. - CREATE = 1; - - // The revision was generated by updating a deployment. - UPDATE = 2; - - // The revision was deleted. - DELETE = 3; - } - - // Possible states of a revision. - enum State { - // The default value. This value is used if the state is omitted. - STATE_UNSPECIFIED = 0; - - // The revision is being applied. - APPLYING = 1; - - // The revision was applied successfully. - APPLIED = 2; - - // The revision could not be applied successfully. - FAILED = 3; - } - - // Possible errors if Revision could not be created or updated successfully. - enum ErrorCode { - // No error code was specified. - ERROR_CODE_UNSPECIFIED = 0; - - // Cloud Build failed due to a permission issue. - CLOUD_BUILD_PERMISSION_DENIED = 1; - - // Cloud Build job associated with creating or updating a deployment could - // not be started. - APPLY_BUILD_API_FAILED = 4; - - // Cloud Build job associated with creating or updating a deployment was - // started but failed. - APPLY_BUILD_RUN_FAILED = 5; - - // quota validation failed for one or more resources in terraform - // configuration files. - QUOTA_VALIDATION_FAILED = 7; - - // Failed to import values from an external source. - EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 8; - } - - // Blueprint that was deployed. - oneof blueprint { - // Output only. A blueprint described using Terraform's HashiCorp - // Configuration Language as a root module. - TerraformBlueprint terraform_blueprint = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Revision name. Format: - // `projects/{project}/locations/{location}/deployments/{deployment}/ - // revisions/{revision}` - string name = 1; - - // Output only. Time when the revision was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time when the revision was last modified. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The action which created this revision - Action action = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Current state of the revision. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Outputs and artifacts from applying a deployment. - ApplyResults apply_results = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional info regarding the current state. - string state_detail = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Code describing any errors that may have occurred. - ErrorCode error_code = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Cloud Build instance UUID associated with this revision. - string build = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Location of Revision operation logs in - // `gs://{bucket}/{object}` format. - string logs = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Errors encountered when creating or updating this deployment. - // Errors are truncated to 10 entries, see `delete_results` and `error_logs` - // for full details. - repeated TerraformError tf_errors = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Location of Terraform error logs in Google Cloud Storage. - // Format: `gs://{bucket}/{object}`. - string error_logs = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. User-specified Service Account (SA) to be used as credential - // to manage resources. Format: - // `projects/{projectID}/serviceAccounts/{serviceAccount}` - string service_account = 14 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "iam.googleapis.com/ServiceAccount" - } - ]; - - // Output only. By default, Infra Manager will return a failure when - // Terraform encounters a 409 code (resource conflict error) during actuation. - // If this flag is set to true, Infra Manager will instead - // attempt to automatically import the resource into the Terraform state (for - // supported resource types) and continue actuation. - // - // Not all resource types are supported, refer to documentation. - bool import_existing_resources = 15 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The user-specified Cloud Build worker pool resource in which - // the Cloud Build job will execute. Format: - // `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. - // If this field is unspecified, the default Cloud Build worker pool will be - // used. - string worker_pool = 17 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "cloudbuild.googleapis.com/WorkerPool" - } - ]; - - // Output only. The user-specified Terraform version constraint. - // Example: "=1.3.10". - string tf_version_constraint = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The version of Terraform used to create the Revision. - // It is in the format of "Major.Minor.Patch", for example, "1.3.10". - string tf_version = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Cloud Storage path containing quota validation results. This - // field is set when a user sets Deployment.quota_validation field to ENABLED - // or ENFORCED. Format: `gs://{bucket}/{object}`. - string quota_validation_results = 29 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Input to control quota checks for resources in terraform - // configuration files. There are limited resources on which quota validation - // applies. - QuotaValidation quota_validation = 20 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. This field specifies the provider configurations. - ProviderConfig provider_config = 21 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Errors encountered during actuation using Terraform -message TerraformError { - // Address of the resource associated with the error, - // e.g. `google_compute_network.vpc_network`. - string resource_address = 1; - - // HTTP response code returned from Google Cloud Platform APIs when Terraform - // fails to provision the resource. If unset or 0, no HTTP response code was - // returned by Terraform. - int32 http_response_code = 2; - - // A human-readable error description. - string error_description = 3; - - // Output only. Original error response from underlying Google API, if - // available. - google.rpc.Status error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A set of files in a Git repository. -message GitSource { - // Optional. Repository URL. - // Example: 'https://github.com/kubernetes/examples.git' - optional string repo = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Subdirectory inside the repository. - // Example: 'staging/my-package' - optional string directory = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Git reference (e.g. branch or tag). - optional string ref = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Ephemeral metadata content describing the state of a deployment operation. -message DeploymentOperationMetadata { - // The possible steps a deployment may be running. - enum DeploymentStep { - // Unspecified deployment step - DEPLOYMENT_STEP_UNSPECIFIED = 0; - - // Infra Manager is creating a Google Cloud Storage bucket to store - // artifacts and metadata about the deployment and revision - PREPARING_STORAGE_BUCKET = 1; - - // Downloading the blueprint onto the Google Cloud Storage bucket - DOWNLOADING_BLUEPRINT = 2; - - // Initializing Terraform using `terraform init` - RUNNING_TF_INIT = 3; - - // Running `terraform plan` - RUNNING_TF_PLAN = 4; - - // Actuating resources using Terraform using `terraform apply` - RUNNING_TF_APPLY = 5; - - // Destroying resources using Terraform using `terraform destroy` - RUNNING_TF_DESTROY = 6; - - // Validating the uploaded TF state file when unlocking a deployment - RUNNING_TF_VALIDATE = 7; - - // Unlocking a deployment - UNLOCKING_DEPLOYMENT = 8; - - // Operation was successful - SUCCEEDED = 9; - - // Operation failed - FAILED = 10; - - // Validating the provided repository. - VALIDATING_REPOSITORY = 11; - - // Running quota validation - RUNNING_QUOTA_VALIDATION = 12; - } - - // The current step the deployment operation is running. - DeploymentStep step = 1; - - // Outputs and artifacts from applying a deployment. - ApplyResults apply_results = 2; - - // Output only. Cloud Build instance UUID associated with this operation. - string build = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Location of Deployment operations logs in - // `gs://{bucket}/{object}` format. - string logs = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Resource represents a Google Cloud Platform resource actuated by IM. -// Resources are child resources of Revisions. -message Resource { - option (google.api.resource) = { - type: "config.googleapis.com/Resource" - pattern: "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}" - }; - - // Possible intent of the resource. - enum Intent { - // The default value. This value is used if the intent is omitted. - INTENT_UNSPECIFIED = 0; - - // Infra Manager will create this Resource. - CREATE = 1; - - // Infra Manager will update this Resource. - UPDATE = 2; - - // Infra Manager will delete this Resource. - DELETE = 3; - - // Infra Manager will destroy and recreate this Resource. - RECREATE = 4; - - // Infra Manager will leave this Resource untouched. - UNCHANGED = 5; - } - - // Possible states of a resource. - enum State { - // The default value. This value is used if the state is omitted. - STATE_UNSPECIFIED = 0; - - // Resource has been planned for reconcile. - PLANNED = 1; - - // Resource is actively reconciling into the intended state. - IN_PROGRESS = 2; - - // Resource has reconciled to intended state. - RECONCILED = 3; - - // Resource failed to reconcile. - FAILED = 4; - } - - // Output only. Resource name. - // Format: - // `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}` - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Terraform-specific info if this resource was created using - // Terraform. - ResourceTerraformInfo terraform_info = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI - // ID). CAI type format follows - // https://cloud.google.com/asset-inventory/docs/supported-asset-types - map cai_assets = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Intent of the resource. - Intent intent = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Current state of the resource. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Terraform info of a Resource. -message ResourceTerraformInfo { - // TF resource address that uniquely identifies this resource within this - // deployment. - string address = 1; - - // TF resource type - string type = 2; - - // ID attribute of the TF resource - string id = 3; -} - -// CAI info of a Resource. -message ResourceCAIInfo { - // CAI resource name in the format following - // https://cloud.google.com/apis/design/resource_names#full_resource_name - string full_resource_name = 1; -} - -// A request to get a Resource from a 'GetResource' call. -message GetResourceRequest { - // Required. The name of the Resource in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "config.googleapis.com/Resource" } - ]; -} - -// A request to list Resources passed to a 'ListResources' call. -message ListResourcesRequest { - // Required. The parent in whose context the Resources are listed. The parent - // value is in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } - ]; - - // When requesting a page of resources, 'page_size' specifies number of - // resources to return. If unspecified, at most 500 will be returned. The - // maximum value is 1000. - int32 page_size = 2; - - // Token returned by previous call to 'ListResources' which specifies the - // position in the list from where to continue listing the resources. - string page_token = 3; - - // Lists the Resources that match the filter expression. A filter - // expression filters the resources listed in the response. The expression - // must be of the form '{field} {operator} {value}' where operators: '<', '>', - // '<=', - // '>=', - // '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - // roughly synonymous with equality). {field} can refer to a proto or JSON - // field, or a synthetic field. Field names can be camelCase or snake_case. - // - // Examples: - // - Filter by name: - // name = - // "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz - string filter = 4; - - // Field to use to sort the list. - string order_by = 5; -} - -// A response to a 'ListResources' call. Contains a list of Resources. -message ListResourcesResponse { - // List of [Resources][google.cloud.config.v1.Resource]. - repeated Resource resources = 1; - - // A token to request the next page of resources from the 'ListResources' - // method. The value of an empty string means that there are no more resources - // to return. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Contains info about a Terraform state file -message Statefile { - // Output only. Cloud Storage signed URI used for downloading or uploading the - // state file. - string signed_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A request to export a state file passed to a 'ExportDeploymentStatefile' -// call. -message ExportDeploymentStatefileRequest { - // Required. The parent in whose context the statefile is listed. The parent - // value is in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/Deployment" - } - ]; - - // Optional. If this flag is set to true, the exported deployment state file - // will be the draft state. This will enable the draft file to be validated - // before copying it over to the working state on unlock. - bool draft = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to export a state file passed to a 'ExportRevisionStatefile' -// call. -message ExportRevisionStatefileRequest { - // Required. The parent in whose context the statefile is listed. The parent - // value is in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } - ]; -} - -// A request to import a state file passed to a 'ImportStatefile' call. -message ImportStatefileRequest { - // Required. The parent in whose context the statefile is listed. The parent - // value is in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/Deployment" - } - ]; - - // Required. Lock ID of the lock file to verify that the user who is importing - // the state file previously locked the Deployment. - int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. - bool skip_draft = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to delete a state file passed to a 'DeleteStatefile' call. -message DeleteStatefileRequest { - // Required. The name of the deployment in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/Deployment" - } - ]; - - // Required. Lock ID of the lock file to verify that the user who is deleting - // the state file previously locked the Deployment. - int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A request to lock a deployment passed to a 'LockDeployment' call. -message LockDeploymentRequest { - // Required. The name of the deployment in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/Deployment" - } - ]; -} - -// A request to unlock a state file passed to a 'UnlockDeployment' call. -message UnlockDeploymentRequest { - // Required. The name of the deployment in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/Deployment" - } - ]; - - // Required. Lock ID of the lock file to be unlocked. - int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A request to get a state file lock info passed to a 'ExportLockInfo' call. -message ExportLockInfoRequest { - // Required. The name of the deployment in the format: - // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/Deployment" - } - ]; -} - -// Details about the lock which locked the deployment. -message LockInfo { - // Unique ID for the lock to be overridden with generation ID in the backend. - int64 lock_id = 1; - - // Terraform operation, provided by the caller. - string operation = 2; - - // Extra information to store with the lock, provided by the caller. - string info = 3; - - // user@hostname when available - string who = 4; - - // Terraform version - string version = 5; - - // Time that the lock was taken. - google.protobuf.Timestamp create_time = 6; -} - -// A preview represents a set of actions Infra Manager would perform -// to move the resources towards the desired state as specified in the -// configuration. -message Preview { - option (google.api.resource) = { - type: "config.googleapis.com/Preview" - pattern: "projects/{project}/locations/{location}/previews/{preview}" - plural: "previews" - singular: "preview" - }; - - // Possible states of a preview. - enum State { - // The default value. This value is used if the state is unknown. - STATE_UNSPECIFIED = 0; - - // The preview is being created. - CREATING = 1; - - // The preview has succeeded. - SUCCEEDED = 2; - - // The preview is being applied. - APPLYING = 3; - - // The preview is stale. A preview can become stale if a revision has been - // applied after this preview was created. - STALE = 4; - - // The preview is being deleted. - DELETING = 5; - - // The preview has encountered an unexpected error. - FAILED = 6; - - // The preview has been deleted. - DELETED = 7; - } - - // Preview mode provides options for customizing preview operations. - enum PreviewMode { - // Unspecified policy, default mode will be used. - PREVIEW_MODE_UNSPECIFIED = 0; - - // DEFAULT mode generates an execution plan for reconciling current resource - // state into expected resource state. - DEFAULT = 1; - - // DELETE mode generates as execution plan for destroying current resources. - DELETE = 2; - } - - // Possible errors that can occur with previews. - enum ErrorCode { - // No error code was specified. - ERROR_CODE_UNSPECIFIED = 0; - - // Cloud Build failed due to a permissions issue. - CLOUD_BUILD_PERMISSION_DENIED = 1; - - // Cloud Storage bucket failed to create due to a permissions issue. - BUCKET_CREATION_PERMISSION_DENIED = 2; - - // Cloud Storage bucket failed for a non-permissions-related issue. - BUCKET_CREATION_FAILED = 3; - - // Acquiring lock on provided deployment reference failed. - DEPLOYMENT_LOCK_ACQUIRE_FAILED = 4; - - // Preview encountered an error when trying to access Cloud Build API. - PREVIEW_BUILD_API_FAILED = 5; - - // Preview created a build but build failed and logs were generated. - PREVIEW_BUILD_RUN_FAILED = 6; - - // Failed to import values from an external source. - EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 7; - } - - // Blueprint to preview. - oneof blueprint { - // The terraform blueprint to preview. - TerraformBlueprint terraform_blueprint = 6; - } - - // Identifier. Resource name of the preview. Resource name can be user - // provided or server generated ID if unspecified. Format: - // `projects/{project}/locations/{location}/previews/{preview}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. Time the preview was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User-defined labels for the preview. - map labels = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Current state of the preview. - State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Optional deployment reference. If specified, the preview will be - // performed using the provided deployment's current state and use any - // relevant fields from the deployment unless explicitly specified in the - // preview create request. - string deployment = 5 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "config.googleapis.com/Deployment" - } - ]; - - // Optional. Current mode of preview. - PreviewMode preview_mode = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Required. User-specified Service Account (SA) credentials to be used when - // previewing resources. - // Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` - string service_account = 7 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "iam.googleapis.com/ServiceAccount" - } - ]; - - // Optional. User-defined location of Cloud Build logs, artifacts, and - // in Google Cloud Storage. - // Format: `gs://{bucket}/{folder}` - // A default bucket will be bootstrapped if the field is not set or empty - // Default Bucket Format: `gs://--blueprint-config` - // Constraints: - // - The bucket needs to be in the same project as the deployment - // - The path cannot be within the path of `gcs_source` - // If omitted and deployment resource ref provided has artifacts_gcs_bucket - // defined, that artifact bucket is used. - optional string artifacts_gcs_bucket = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The user-specified Worker Pool resource in which the Cloud Build - // job will execute. Format - // projects/{project}/locations/{location}/workerPools/{workerPoolId} If this - // field is unspecified, the default Cloud Build worker pool will be used. If - // omitted and deployment resource ref provided has worker_pool defined, that - // worker pool is used. - optional string worker_pool = 9 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "cloudbuild.googleapis.com/WorkerPool" - } - ]; - - // Output only. Code describing any errors that may have occurred. - ErrorCode error_code = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information regarding the current state. - google.rpc.Status error_status = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Cloud Build instance UUID associated with this preview. - string build = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Summary of errors encountered during Terraform preview. - // It has a size limit of 10, i.e. only top 10 errors will be summarized here. - repeated TerraformError tf_errors = 13 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Link to tf-error.ndjson file, which contains the full list of - // the errors encountered during a Terraform preview. - // Format: `gs://{bucket}/{object}`. - string error_logs = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Artifacts from preview. - PreviewArtifacts preview_artifacts = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Location of preview logs in `gs://{bucket}/{object}` format. - string logs = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current Terraform version set on the preview. - // It is in the format of "Major.Minor.Patch", for example, "1.3.10". - string tf_version = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The user-specified Terraform version constraint. - // Example: "=1.3.10". - optional string tf_version_constraint = 19 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Arbitrary key-value metadata storage e.g. to help client tools - // identify preview during automation. See - // https://google.aip.dev/148#annotations for details on format and size - // limitations. - map annotations = 20 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. This field specifies the provider configurations. - ProviderConfig provider_config = 21 [(google.api.field_behavior) = OPTIONAL]; -} - -// Ephemeral metadata content describing the state of a preview operation. -message PreviewOperationMetadata { - // The possible steps a preview may be running. - enum PreviewStep { - // Unspecified preview step. - PREVIEW_STEP_UNSPECIFIED = 0; - - // Infra Manager is creating a Google Cloud Storage bucket to store - // artifacts and metadata about the preview. - PREPARING_STORAGE_BUCKET = 1; - - // Downloading the blueprint onto the Google Cloud Storage bucket. - DOWNLOADING_BLUEPRINT = 2; - - // Initializing Terraform using `terraform init`. - RUNNING_TF_INIT = 3; - - // Running `terraform plan`. - RUNNING_TF_PLAN = 4; - - // Fetching a deployment. - FETCHING_DEPLOYMENT = 5; - - // Locking a deployment. - LOCKING_DEPLOYMENT = 6; - - // Unlocking a deployment. - UNLOCKING_DEPLOYMENT = 7; - - // Operation was successful. - SUCCEEDED = 8; - - // Operation failed. - FAILED = 9; - - // Validating the provided repository. - VALIDATING_REPOSITORY = 10; - } - - // The current step the preview operation is running. - PreviewStep step = 1; - - // Artifacts from preview. - PreviewArtifacts preview_artifacts = 2; - - // Output only. Location of preview logs in `gs://{bucket}/{object}` format. - string logs = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Cloud Build instance UUID associated with this preview. - string build = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Artifacts created by preview. -message PreviewArtifacts { - // Output only. Location of a blueprint copy and other content in Google Cloud - // Storage. Format: `gs://{bucket}/{object}` - string content = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Location of artifacts in Google Cloud Storage. - // Format: `gs://{bucket}/{object}` - string artifacts = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A request to create a preview. -message CreatePreviewRequest { - // Required. The parent in whose context the Preview is created. The parent - // value is in the format: 'projects/{project_id}/locations/{location}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. The preview ID. - string preview_id = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. [Preview][google.cloud.config.v1.Preview] resource to be created. - Preview preview = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional request ID to identify requests. Specify a unique - // request ID so that if you must retry your request, the server will know to - // ignore the request if it has already been completed. The server will - // guarantee that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [ - (google.api.field_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// A request to get details about a preview. -message GetPreviewRequest { - // Required. The name of the preview. Format: - // 'projects/{project_id}/locations/{location}/previews/{preview}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } - ]; -} - -// A request to list all previews for a given project and location. -message ListPreviewsRequest { - // Required. The parent in whose context the Previews are listed. The parent - // value is in the format: 'projects/{project_id}/locations/{location}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. When requesting a page of resources, 'page_size' specifies number - // of resources to return. If unspecified, at most 500 will be returned. The - // maximum value is 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Token returned by previous call to 'ListDeployments' which - // specifies the position in the list from where to continue listing the - // resources. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Lists the Deployments that match the filter expression. A filter - // expression filters the resources listed in the response. The expression - // must be of the form '{field} {operator} {value}' where operators: '<', '>', - // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - // operator which is roughly synonymous with equality). {field} can refer to a - // proto or JSON field, or a synthetic field. Field names can be camelCase or - // snake_case. - // - // Examples: - // - Filter by name: - // name = "projects/foo/locations/us-central1/deployments/bar - // - // - Filter by labels: - // - Resources that have a key called 'foo' - // labels.foo:* - // - Resources that have a key called 'foo' whose value is 'bar' - // labels.foo = bar - // - // - Filter by state: - // - Deployments in CREATING state. - // state=CREATING - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field to use to sort the list. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// A response to a `ListPreviews` call. Contains a list of Previews. -message ListPreviewsResponse { - // List of [Previews][google.cloud.config.v1.Preview]. - repeated Preview previews = 1; - - // Token to be supplied to the next ListPreviews request via `page_token` - // to obtain the next set of results. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// A request to delete a preview. -message DeletePreviewRequest { - // Required. The name of the Preview in the format: - // 'projects/{project_id}/locations/{location}/previews/{preview}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } - ]; - - // Optional. An optional request ID to identify requests. Specify a unique - // request ID so that if you must retry your request, the server will know to - // ignore the request if it has already been completed. The server will - // guarantee that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [ - (google.api.field_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// A request to export preview results. -message ExportPreviewResultRequest { - // Required. The preview whose results should be exported. The preview value - // is in the format: - // 'projects/{project_id}/locations/{location}/previews/{preview}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } - ]; -} - -// A response to `ExportPreviewResult` call. Contains preview results. -message ExportPreviewResultResponse { - // Output only. Signed URLs for accessing the plan files. - PreviewResult result = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Contains a signed Cloud Storage URLs. -message PreviewResult { - // Output only. Plan binary signed URL - string binary_signed_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Plan JSON signed URL - string json_signed_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for the GetTerraformVersion method. -message GetTerraformVersionRequest { - // Required. The name of the TerraformVersion. Format: - // 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}' - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/TerraformVersion" - } - ]; -} - -// The request message for the ListTerraformVersions method. -message ListTerraformVersionsRequest { - // Required. The parent in whose context the TerraformVersions are listed. The - // parent value is in the format: - // 'projects/{project_id}/locations/{location}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. When requesting a page of terraform versions, 'page_size' - // specifies number of terraform versions to return. If unspecified, at most - // 500 will be returned. The maximum value is 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Token returned by previous call to 'ListTerraformVersions' which - // specifies the position in the list from where to continue listing the - // terraform versions. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Lists the TerraformVersions that match the filter expression. A - // filter expression filters the resources listed in the response. The - // expression must be of the form '{field} {operator} {value}' where - // operators: '<', '>', - // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - // operator which is roughly synonymous with equality). {field} can refer to a - // proto or JSON field, or a synthetic field. Field names can be camelCase or - // snake_case. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field to use to sort the list. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for the `ListTerraformVersions` method. -message ListTerraformVersionsResponse { - // List of [TerraformVersion][google.cloud.config.v1.TerraformVersion]s. - repeated TerraformVersion terraform_versions = 1; - - // Token to be supplied to the next ListTerraformVersions request via - // `page_token` to obtain the next set of results. - string next_page_token = 2; - - // Unreachable resources, if any. - repeated string unreachable = 3; -} - -// A TerraformVersion represents the support state the corresponding -// Terraform version. -message TerraformVersion { - option (google.api.resource) = { - type: "config.googleapis.com/TerraformVersion" - pattern: "projects/{project}/locations/{location}/terraformVersions/{terraform_version}" - plural: "terraformVersions" - singular: "terraformVersion" - }; - - // Possible states of a TerraformVersion. - enum State { - // The default value. This value is used if the state is omitted. - STATE_UNSPECIFIED = 0; - - // The version is actively supported. - ACTIVE = 1; - - // The version is deprecated. - DEPRECATED = 2; - - // The version is obsolete. - OBSOLETE = 3; - } - - // Identifier. The version name is in the format: - // 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. The state of the version, ACTIVE, DEPRECATED or OBSOLETE. - State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. When the version is supported. - google.protobuf.Timestamp support_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. When the version is deprecated. - optional google.protobuf.Timestamp deprecate_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. When the version is obsolete. - optional google.protobuf.Timestamp obsolete_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Terraform info of a ResourceChange. -message ResourceChangeTerraformInfo { - // Output only. TF resource address that uniquely identifies the resource. - string address = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. TF resource type. - string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. TF resource name. - string resource_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. TF resource provider. - string provider = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. TF resource actions. - repeated string actions = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A resource change represents a change to a resource in the state file. -message ResourceChange { - option (google.api.resource) = { - type: "config.googleapis.com/ResourceChange" - pattern: "projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}" - plural: "resourceChanges" - singular: "resourceChange" - }; - - // Possible intent of the resource change. - enum Intent { - // The default value. - INTENT_UNSPECIFIED = 0; - - // The resource will be created. - CREATE = 1; - - // The resource will be updated. - UPDATE = 2; - - // The resource will be deleted. - DELETE = 3; - - // The resource will be recreated. - RECREATE = 4; - - // The resource will be untouched. - UNCHANGED = 5; - } - - // Identifier. The name of the resource change. - // Format: - // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. Terraform info of the resource change. - ResourceChangeTerraformInfo terraform_info = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The intent of the resource change. - Intent intent = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The property changes of the resource change. - repeated PropertyChange property_changes = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A property change represents a change to a property in the state file. -message PropertyChange { - // Output only. The path of the property change. - string path = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The paths of sensitive fields in `before`. Paths are relative - // to `path`. - repeated string before_sensitive_paths = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Representations of the object value before the actions. - google.protobuf.Value before = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The paths of sensitive fields in `after`. Paths are relative - // to `path`. - repeated string after_sensitive_paths = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Representations of the object value after the actions. - google.protobuf.Value after = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for the ListResourceChanges method. -message ListResourceChangesRequest { - // Required. The parent in whose context the ResourceChanges are listed. The - // parent value is in the format: - // 'projects/{project_id}/locations/{location}/previews/{preview}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } - ]; - - // Optional. When requesting a page of resource changes, 'page_size' specifies - // number of resource changes to return. If unspecified, at most 500 will be - // returned. The maximum value is 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Token returned by previous call to 'ListResourceChanges' which - // specifies the position in the list from where to continue listing the - // resource changes. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Lists the resource changes that match the filter expression. A - // filter expression filters the resource changes listed in the response. The - // expression must be of the form '{field} {operator} {value}' where - // operators: '<', '>', - // '<=', - // '>=', - // '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - // roughly synonymous with equality). {field} can refer to a proto or JSON - // field, or a synthetic field. Field names can be camelCase or snake_case. - // - // Examples: - // - Filter by name: - // name = - // "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field to use to sort the list. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// A response to a 'ListResourceChanges' call. Contains a list of -// ResourceChanges. -message ListResourceChangesResponse { - // List of ResourceChanges. - repeated ResourceChange resource_changes = 1; - - // A token to request the next page of resources from the - // 'ListResourceChanges' method. The value of an empty string means that - // there are no more resources to return. - string next_page_token = 2; - - // Unreachable resources, if any. - repeated string unreachable = 3; -} - -// The request message for the GetResourceChange method. -message GetResourceChangeRequest { - // Required. The name of the resource change to retrieve. - // Format: - // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/ResourceChange" - } - ]; -} - -// Terraform info of a ResourceChange. -message ResourceDriftTerraformInfo { - // Output only. The address of the drifted resource. - string address = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The type of the drifted resource. - string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. TF resource name. - string resource_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The provider of the drifted resource. - string provider = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A resource drift represents a drift to a resource in the state file. -message ResourceDrift { - option (google.api.resource) = { - type: "config.googleapis.com/ResourceDrift" - pattern: "projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}" - plural: "resourceDrifts" - singular: "resourceDrift" - }; - - // Identifier. The name of the resource drift. - // Format: - // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. Terraform info of the resource drift. - ResourceDriftTerraformInfo terraform_info = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The property drifts of the resource drift. - repeated PropertyDrift property_drifts = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A property drift represents a drift to a property in the state file. -message PropertyDrift { - // Output only. The path of the property drift. - string path = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The paths of sensitive fields in `before`. Paths are relative - // to `path`. - repeated string before_sensitive_paths = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Representations of the object value before the actions. - google.protobuf.Value before = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The paths of sensitive fields in `after`. Paths are relative - // to `path`. - repeated string after_sensitive_paths = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Representations of the object value after the actions. - google.protobuf.Value after = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for the ListResourceDrifts method. -message ListResourceDriftsRequest { - // Required. The parent in whose context the ResourceDrifts are listed. The - // parent value is in the format: - // 'projects/{project_id}/locations/{location}/previews/{preview}'. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } - ]; - - // Optional. When requesting a page of resource drifts, 'page_size' specifies - // number of resource drifts to return. If unspecified, at most 500 will be - // returned. The maximum value is 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Token returned by previous call to 'ListResourceDrifts' which - // specifies the position in the list from where to continue listing the - // resource drifts. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Lists the resource drifts that match the filter expression. A - // filter expression filters the resource drifts listed in the response. The - // expression must be of the form '{field} {operator} {value}' where - // operators: '<', '>', - // '<=', - // '>=', - // '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - // roughly synonymous with equality). {field} can refer to a proto or JSON - // field, or a synthetic field. Field names can be camelCase or snake_case. - // - // Examples: - // - Filter by name: - // name = - // "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field to use to sort the list. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// A response to a 'ListResourceDrifts' call. Contains a list of ResourceDrifts. -message ListResourceDriftsResponse { - // List of ResourceDrifts. - repeated ResourceDrift resource_drifts = 1; - - // A token to request the next page of resources from the - // 'ListResourceDrifts' method. The value of an empty string means that - // there are no more resources to return. - string next_page_token = 2; - - // Unreachable resources, if any. - repeated string unreachable = 3; -} - -// The request message for the GetResourceDrift method. -message GetResourceDriftRequest { - // Required. The name of the resource drift to retrieve. - // Format: - // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/ResourceDrift" - } - ]; -} - -// ProviderConfig contains the provider configurations. -message ProviderConfig { - // ProviderSource represents the source type of the provider. - enum ProviderSource { - // Unspecified source type, default to public sources. - PROVIDER_SOURCE_UNSPECIFIED = 0; - - // Service maintained provider source type. - SERVICE_MAINTAINED = 1; - } - - // Optional. ProviderSource specifies the source type of the provider. - optional ProviderSource source_type = 1 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for the GetAutoMigrationConfig method. -message GetAutoMigrationConfigRequest { - // Required. The name of the AutoMigrationConfig. - // Format: - // 'projects/{project_id}/locations/{location}/AutoMigrationConfig'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "config.googleapis.com/AutoMigrationConfig" - } - ]; -} - -// AutoMigrationConfig contains the automigration configuration for a project. -message AutoMigrationConfig { - option (google.api.resource) = { - type: "config.googleapis.com/AutoMigrationConfig" - pattern: "projects/{project}/locations/{location}/autoMigrationConfig" - plural: "autoMigrationConfigs" - singular: "autoMigrationConfig" - }; - - // Identifier. The name of the AutoMigrationConfig. - // Format: - // 'projects/{project_id}/locations/{location}/AutoMigrationConfig'. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. Time the AutoMigrationConfig was last updated. - google.protobuf.Timestamp update_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Whether the auto migration is enabled for the project. - bool auto_migration_enabled = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for the UpdateAutoMigrationConfig method. -message UpdateAutoMigrationConfigRequest { - // Optional. The update mask applies to the resource. See - // [google.protobuf.FieldMask][google.protobuf.FieldMask]. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. The AutoMigrationConfig to update. - AutoMigrationConfig auto_migration_config = 2 - [(google.api.field_behavior) = REQUIRED]; -} diff --git a/owl-bot-staging/google-cloud-config/protos/protos.d.ts b/owl-bot-staging/google-cloud-config/protos/protos.d.ts deleted file mode 100644 index 28500e566ce..00000000000 --- a/owl-bot-staging/google-cloud-config/protos/protos.d.ts +++ /dev/null @@ -1,16568 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this 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 type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace cloud. */ - namespace cloud { - - /** Namespace config. */ - namespace config { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a Config */ - class Config extends $protobuf.rpc.Service { - - /** - * Constructs a new Config 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 Config 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): Config; - - /** - * Calls ListDeployments. - * @param request ListDeploymentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDeploymentsResponse - */ - public listDeployments(request: google.cloud.config.v1.IListDeploymentsRequest, callback: google.cloud.config.v1.Config.ListDeploymentsCallback): void; - - /** - * Calls ListDeployments. - * @param request ListDeploymentsRequest message or plain object - * @returns Promise - */ - public listDeployments(request: google.cloud.config.v1.IListDeploymentsRequest): Promise; - - /** - * Calls GetDeployment. - * @param request GetDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Deployment - */ - public getDeployment(request: google.cloud.config.v1.IGetDeploymentRequest, callback: google.cloud.config.v1.Config.GetDeploymentCallback): void; - - /** - * Calls GetDeployment. - * @param request GetDeploymentRequest message or plain object - * @returns Promise - */ - public getDeployment(request: google.cloud.config.v1.IGetDeploymentRequest): Promise; - - /** - * Calls CreateDeployment. - * @param request CreateDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createDeployment(request: google.cloud.config.v1.ICreateDeploymentRequest, callback: google.cloud.config.v1.Config.CreateDeploymentCallback): void; - - /** - * Calls CreateDeployment. - * @param request CreateDeploymentRequest message or plain object - * @returns Promise - */ - public createDeployment(request: google.cloud.config.v1.ICreateDeploymentRequest): Promise; - - /** - * Calls UpdateDeployment. - * @param request UpdateDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateDeployment(request: google.cloud.config.v1.IUpdateDeploymentRequest, callback: google.cloud.config.v1.Config.UpdateDeploymentCallback): void; - - /** - * Calls UpdateDeployment. - * @param request UpdateDeploymentRequest message or plain object - * @returns Promise - */ - public updateDeployment(request: google.cloud.config.v1.IUpdateDeploymentRequest): Promise; - - /** - * Calls DeleteDeployment. - * @param request DeleteDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteDeployment(request: google.cloud.config.v1.IDeleteDeploymentRequest, callback: google.cloud.config.v1.Config.DeleteDeploymentCallback): void; - - /** - * Calls DeleteDeployment. - * @param request DeleteDeploymentRequest message or plain object - * @returns Promise - */ - public deleteDeployment(request: google.cloud.config.v1.IDeleteDeploymentRequest): Promise; - - /** - * Calls ListRevisions. - * @param request ListRevisionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListRevisionsResponse - */ - public listRevisions(request: google.cloud.config.v1.IListRevisionsRequest, callback: google.cloud.config.v1.Config.ListRevisionsCallback): void; - - /** - * Calls ListRevisions. - * @param request ListRevisionsRequest message or plain object - * @returns Promise - */ - public listRevisions(request: google.cloud.config.v1.IListRevisionsRequest): Promise; - - /** - * Calls GetRevision. - * @param request GetRevisionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Revision - */ - public getRevision(request: google.cloud.config.v1.IGetRevisionRequest, callback: google.cloud.config.v1.Config.GetRevisionCallback): void; - - /** - * Calls GetRevision. - * @param request GetRevisionRequest message or plain object - * @returns Promise - */ - public getRevision(request: google.cloud.config.v1.IGetRevisionRequest): Promise; - - /** - * Calls GetResource. - * @param request GetResourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Resource - */ - public getResource(request: google.cloud.config.v1.IGetResourceRequest, callback: google.cloud.config.v1.Config.GetResourceCallback): void; - - /** - * Calls GetResource. - * @param request GetResourceRequest message or plain object - * @returns Promise - */ - public getResource(request: google.cloud.config.v1.IGetResourceRequest): Promise; - - /** - * Calls ListResources. - * @param request ListResourcesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListResourcesResponse - */ - public listResources(request: google.cloud.config.v1.IListResourcesRequest, callback: google.cloud.config.v1.Config.ListResourcesCallback): void; - - /** - * Calls ListResources. - * @param request ListResourcesRequest message or plain object - * @returns Promise - */ - public listResources(request: google.cloud.config.v1.IListResourcesRequest): Promise; - - /** - * Calls ExportDeploymentStatefile. - * @param request ExportDeploymentStatefileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Statefile - */ - public exportDeploymentStatefile(request: google.cloud.config.v1.IExportDeploymentStatefileRequest, callback: google.cloud.config.v1.Config.ExportDeploymentStatefileCallback): void; - - /** - * Calls ExportDeploymentStatefile. - * @param request ExportDeploymentStatefileRequest message or plain object - * @returns Promise - */ - public exportDeploymentStatefile(request: google.cloud.config.v1.IExportDeploymentStatefileRequest): Promise; - - /** - * Calls ExportRevisionStatefile. - * @param request ExportRevisionStatefileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Statefile - */ - public exportRevisionStatefile(request: google.cloud.config.v1.IExportRevisionStatefileRequest, callback: google.cloud.config.v1.Config.ExportRevisionStatefileCallback): void; - - /** - * Calls ExportRevisionStatefile. - * @param request ExportRevisionStatefileRequest message or plain object - * @returns Promise - */ - public exportRevisionStatefile(request: google.cloud.config.v1.IExportRevisionStatefileRequest): Promise; - - /** - * Calls ImportStatefile. - * @param request ImportStatefileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Statefile - */ - public importStatefile(request: google.cloud.config.v1.IImportStatefileRequest, callback: google.cloud.config.v1.Config.ImportStatefileCallback): void; - - /** - * Calls ImportStatefile. - * @param request ImportStatefileRequest message or plain object - * @returns Promise - */ - public importStatefile(request: google.cloud.config.v1.IImportStatefileRequest): Promise; - - /** - * Calls DeleteStatefile. - * @param request DeleteStatefileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteStatefile(request: google.cloud.config.v1.IDeleteStatefileRequest, callback: google.cloud.config.v1.Config.DeleteStatefileCallback): void; - - /** - * Calls DeleteStatefile. - * @param request DeleteStatefileRequest message or plain object - * @returns Promise - */ - public deleteStatefile(request: google.cloud.config.v1.IDeleteStatefileRequest): Promise; - - /** - * Calls LockDeployment. - * @param request LockDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public lockDeployment(request: google.cloud.config.v1.ILockDeploymentRequest, callback: google.cloud.config.v1.Config.LockDeploymentCallback): void; - - /** - * Calls LockDeployment. - * @param request LockDeploymentRequest message or plain object - * @returns Promise - */ - public lockDeployment(request: google.cloud.config.v1.ILockDeploymentRequest): Promise; - - /** - * Calls UnlockDeployment. - * @param request UnlockDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public unlockDeployment(request: google.cloud.config.v1.IUnlockDeploymentRequest, callback: google.cloud.config.v1.Config.UnlockDeploymentCallback): void; - - /** - * Calls UnlockDeployment. - * @param request UnlockDeploymentRequest message or plain object - * @returns Promise - */ - public unlockDeployment(request: google.cloud.config.v1.IUnlockDeploymentRequest): Promise; - - /** - * Calls ExportLockInfo. - * @param request ExportLockInfoRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LockInfo - */ - public exportLockInfo(request: google.cloud.config.v1.IExportLockInfoRequest, callback: google.cloud.config.v1.Config.ExportLockInfoCallback): void; - - /** - * Calls ExportLockInfo. - * @param request ExportLockInfoRequest message or plain object - * @returns Promise - */ - public exportLockInfo(request: google.cloud.config.v1.IExportLockInfoRequest): Promise; - - /** - * Calls CreatePreview. - * @param request CreatePreviewRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createPreview(request: google.cloud.config.v1.ICreatePreviewRequest, callback: google.cloud.config.v1.Config.CreatePreviewCallback): void; - - /** - * Calls CreatePreview. - * @param request CreatePreviewRequest message or plain object - * @returns Promise - */ - public createPreview(request: google.cloud.config.v1.ICreatePreviewRequest): Promise; - - /** - * Calls GetPreview. - * @param request GetPreviewRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Preview - */ - public getPreview(request: google.cloud.config.v1.IGetPreviewRequest, callback: google.cloud.config.v1.Config.GetPreviewCallback): void; - - /** - * Calls GetPreview. - * @param request GetPreviewRequest message or plain object - * @returns Promise - */ - public getPreview(request: google.cloud.config.v1.IGetPreviewRequest): Promise; - - /** - * Calls ListPreviews. - * @param request ListPreviewsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPreviewsResponse - */ - public listPreviews(request: google.cloud.config.v1.IListPreviewsRequest, callback: google.cloud.config.v1.Config.ListPreviewsCallback): void; - - /** - * Calls ListPreviews. - * @param request ListPreviewsRequest message or plain object - * @returns Promise - */ - public listPreviews(request: google.cloud.config.v1.IListPreviewsRequest): Promise; - - /** - * Calls DeletePreview. - * @param request DeletePreviewRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deletePreview(request: google.cloud.config.v1.IDeletePreviewRequest, callback: google.cloud.config.v1.Config.DeletePreviewCallback): void; - - /** - * Calls DeletePreview. - * @param request DeletePreviewRequest message or plain object - * @returns Promise - */ - public deletePreview(request: google.cloud.config.v1.IDeletePreviewRequest): Promise; - - /** - * Calls ExportPreviewResult. - * @param request ExportPreviewResultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ExportPreviewResultResponse - */ - public exportPreviewResult(request: google.cloud.config.v1.IExportPreviewResultRequest, callback: google.cloud.config.v1.Config.ExportPreviewResultCallback): void; - - /** - * Calls ExportPreviewResult. - * @param request ExportPreviewResultRequest message or plain object - * @returns Promise - */ - public exportPreviewResult(request: google.cloud.config.v1.IExportPreviewResultRequest): Promise; - - /** - * Calls ListTerraformVersions. - * @param request ListTerraformVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTerraformVersionsResponse - */ - public listTerraformVersions(request: google.cloud.config.v1.IListTerraformVersionsRequest, callback: google.cloud.config.v1.Config.ListTerraformVersionsCallback): void; - - /** - * Calls ListTerraformVersions. - * @param request ListTerraformVersionsRequest message or plain object - * @returns Promise - */ - public listTerraformVersions(request: google.cloud.config.v1.IListTerraformVersionsRequest): Promise; - - /** - * Calls GetTerraformVersion. - * @param request GetTerraformVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TerraformVersion - */ - public getTerraformVersion(request: google.cloud.config.v1.IGetTerraformVersionRequest, callback: google.cloud.config.v1.Config.GetTerraformVersionCallback): void; - - /** - * Calls GetTerraformVersion. - * @param request GetTerraformVersionRequest message or plain object - * @returns Promise - */ - public getTerraformVersion(request: google.cloud.config.v1.IGetTerraformVersionRequest): Promise; - - /** - * Calls ListResourceChanges. - * @param request ListResourceChangesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListResourceChangesResponse - */ - public listResourceChanges(request: google.cloud.config.v1.IListResourceChangesRequest, callback: google.cloud.config.v1.Config.ListResourceChangesCallback): void; - - /** - * Calls ListResourceChanges. - * @param request ListResourceChangesRequest message or plain object - * @returns Promise - */ - public listResourceChanges(request: google.cloud.config.v1.IListResourceChangesRequest): Promise; - - /** - * Calls GetResourceChange. - * @param request GetResourceChangeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ResourceChange - */ - public getResourceChange(request: google.cloud.config.v1.IGetResourceChangeRequest, callback: google.cloud.config.v1.Config.GetResourceChangeCallback): void; - - /** - * Calls GetResourceChange. - * @param request GetResourceChangeRequest message or plain object - * @returns Promise - */ - public getResourceChange(request: google.cloud.config.v1.IGetResourceChangeRequest): Promise; - - /** - * Calls ListResourceDrifts. - * @param request ListResourceDriftsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListResourceDriftsResponse - */ - public listResourceDrifts(request: google.cloud.config.v1.IListResourceDriftsRequest, callback: google.cloud.config.v1.Config.ListResourceDriftsCallback): void; - - /** - * Calls ListResourceDrifts. - * @param request ListResourceDriftsRequest message or plain object - * @returns Promise - */ - public listResourceDrifts(request: google.cloud.config.v1.IListResourceDriftsRequest): Promise; - - /** - * Calls GetResourceDrift. - * @param request GetResourceDriftRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ResourceDrift - */ - public getResourceDrift(request: google.cloud.config.v1.IGetResourceDriftRequest, callback: google.cloud.config.v1.Config.GetResourceDriftCallback): void; - - /** - * Calls GetResourceDrift. - * @param request GetResourceDriftRequest message or plain object - * @returns Promise - */ - public getResourceDrift(request: google.cloud.config.v1.IGetResourceDriftRequest): Promise; - - /** - * Calls GetAutoMigrationConfig. - * @param request GetAutoMigrationConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AutoMigrationConfig - */ - public getAutoMigrationConfig(request: google.cloud.config.v1.IGetAutoMigrationConfigRequest, callback: google.cloud.config.v1.Config.GetAutoMigrationConfigCallback): void; - - /** - * Calls GetAutoMigrationConfig. - * @param request GetAutoMigrationConfigRequest message or plain object - * @returns Promise - */ - public getAutoMigrationConfig(request: google.cloud.config.v1.IGetAutoMigrationConfigRequest): Promise; - - /** - * Calls UpdateAutoMigrationConfig. - * @param request UpdateAutoMigrationConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateAutoMigrationConfig(request: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, callback: google.cloud.config.v1.Config.UpdateAutoMigrationConfigCallback): void; - - /** - * Calls UpdateAutoMigrationConfig. - * @param request UpdateAutoMigrationConfigRequest message or plain object - * @returns Promise - */ - public updateAutoMigrationConfig(request: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest): Promise; - } - - namespace Config { - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listDeployments}. - * @param error Error, if any - * @param [response] ListDeploymentsResponse - */ - type ListDeploymentsCallback = (error: (Error|null), response?: google.cloud.config.v1.ListDeploymentsResponse) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getDeployment}. - * @param error Error, if any - * @param [response] Deployment - */ - type GetDeploymentCallback = (error: (Error|null), response?: google.cloud.config.v1.Deployment) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|createDeployment}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|updateDeployment}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|deleteDeployment}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listRevisions}. - * @param error Error, if any - * @param [response] ListRevisionsResponse - */ - type ListRevisionsCallback = (error: (Error|null), response?: google.cloud.config.v1.ListRevisionsResponse) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getRevision}. - * @param error Error, if any - * @param [response] Revision - */ - type GetRevisionCallback = (error: (Error|null), response?: google.cloud.config.v1.Revision) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getResource}. - * @param error Error, if any - * @param [response] Resource - */ - type GetResourceCallback = (error: (Error|null), response?: google.cloud.config.v1.Resource) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listResources}. - * @param error Error, if any - * @param [response] ListResourcesResponse - */ - type ListResourcesCallback = (error: (Error|null), response?: google.cloud.config.v1.ListResourcesResponse) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|exportDeploymentStatefile}. - * @param error Error, if any - * @param [response] Statefile - */ - type ExportDeploymentStatefileCallback = (error: (Error|null), response?: google.cloud.config.v1.Statefile) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|exportRevisionStatefile}. - * @param error Error, if any - * @param [response] Statefile - */ - type ExportRevisionStatefileCallback = (error: (Error|null), response?: google.cloud.config.v1.Statefile) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|importStatefile}. - * @param error Error, if any - * @param [response] Statefile - */ - type ImportStatefileCallback = (error: (Error|null), response?: google.cloud.config.v1.Statefile) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|deleteStatefile}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteStatefileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|lockDeployment}. - * @param error Error, if any - * @param [response] Operation - */ - type LockDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|unlockDeployment}. - * @param error Error, if any - * @param [response] Operation - */ - type UnlockDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|exportLockInfo}. - * @param error Error, if any - * @param [response] LockInfo - */ - type ExportLockInfoCallback = (error: (Error|null), response?: google.cloud.config.v1.LockInfo) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|createPreview}. - * @param error Error, if any - * @param [response] Operation - */ - type CreatePreviewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getPreview}. - * @param error Error, if any - * @param [response] Preview - */ - type GetPreviewCallback = (error: (Error|null), response?: google.cloud.config.v1.Preview) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listPreviews}. - * @param error Error, if any - * @param [response] ListPreviewsResponse - */ - type ListPreviewsCallback = (error: (Error|null), response?: google.cloud.config.v1.ListPreviewsResponse) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|deletePreview}. - * @param error Error, if any - * @param [response] Operation - */ - type DeletePreviewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|exportPreviewResult}. - * @param error Error, if any - * @param [response] ExportPreviewResultResponse - */ - type ExportPreviewResultCallback = (error: (Error|null), response?: google.cloud.config.v1.ExportPreviewResultResponse) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listTerraformVersions}. - * @param error Error, if any - * @param [response] ListTerraformVersionsResponse - */ - type ListTerraformVersionsCallback = (error: (Error|null), response?: google.cloud.config.v1.ListTerraformVersionsResponse) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getTerraformVersion}. - * @param error Error, if any - * @param [response] TerraformVersion - */ - type GetTerraformVersionCallback = (error: (Error|null), response?: google.cloud.config.v1.TerraformVersion) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listResourceChanges}. - * @param error Error, if any - * @param [response] ListResourceChangesResponse - */ - type ListResourceChangesCallback = (error: (Error|null), response?: google.cloud.config.v1.ListResourceChangesResponse) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getResourceChange}. - * @param error Error, if any - * @param [response] ResourceChange - */ - type GetResourceChangeCallback = (error: (Error|null), response?: google.cloud.config.v1.ResourceChange) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listResourceDrifts}. - * @param error Error, if any - * @param [response] ListResourceDriftsResponse - */ - type ListResourceDriftsCallback = (error: (Error|null), response?: google.cloud.config.v1.ListResourceDriftsResponse) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getResourceDrift}. - * @param error Error, if any - * @param [response] ResourceDrift - */ - type GetResourceDriftCallback = (error: (Error|null), response?: google.cloud.config.v1.ResourceDrift) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getAutoMigrationConfig}. - * @param error Error, if any - * @param [response] AutoMigrationConfig - */ - type GetAutoMigrationConfigCallback = (error: (Error|null), response?: google.cloud.config.v1.AutoMigrationConfig) => void; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|updateAutoMigrationConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateAutoMigrationConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** QuotaValidation enum. */ - enum QuotaValidation { - QUOTA_VALIDATION_UNSPECIFIED = 0, - ENABLED = 1, - ENFORCED = 2 - } - - /** Properties of a Deployment. */ - interface IDeployment { - - /** Deployment terraformBlueprint */ - terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); - - /** Deployment name */ - name?: (string|null); - - /** Deployment createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Deployment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Deployment labels */ - labels?: ({ [k: string]: string }|null); - - /** Deployment state */ - state?: (google.cloud.config.v1.Deployment.State|keyof typeof google.cloud.config.v1.Deployment.State|null); - - /** Deployment latestRevision */ - latestRevision?: (string|null); - - /** Deployment stateDetail */ - stateDetail?: (string|null); - - /** Deployment errorCode */ - errorCode?: (google.cloud.config.v1.Deployment.ErrorCode|keyof typeof google.cloud.config.v1.Deployment.ErrorCode|null); - - /** Deployment deleteResults */ - deleteResults?: (google.cloud.config.v1.IApplyResults|null); - - /** Deployment deleteBuild */ - deleteBuild?: (string|null); - - /** Deployment deleteLogs */ - deleteLogs?: (string|null); - - /** Deployment tfErrors */ - tfErrors?: (google.cloud.config.v1.ITerraformError[]|null); - - /** Deployment errorLogs */ - errorLogs?: (string|null); - - /** Deployment artifactsGcsBucket */ - artifactsGcsBucket?: (string|null); - - /** Deployment serviceAccount */ - serviceAccount?: (string|null); - - /** Deployment importExistingResources */ - importExistingResources?: (boolean|null); - - /** Deployment workerPool */ - workerPool?: (string|null); - - /** Deployment lockState */ - lockState?: (google.cloud.config.v1.Deployment.LockState|keyof typeof google.cloud.config.v1.Deployment.LockState|null); - - /** Deployment tfVersionConstraint */ - tfVersionConstraint?: (string|null); - - /** Deployment tfVersion */ - tfVersion?: (string|null); - - /** Deployment quotaValidation */ - quotaValidation?: (google.cloud.config.v1.QuotaValidation|keyof typeof google.cloud.config.v1.QuotaValidation|null); - - /** Deployment annotations */ - annotations?: ({ [k: string]: string }|null); - - /** Deployment providerConfig */ - providerConfig?: (google.cloud.config.v1.IProviderConfig|null); - } - - /** Represents a Deployment. */ - class Deployment implements IDeployment { - - /** - * Constructs a new Deployment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IDeployment); - - /** Deployment terraformBlueprint. */ - public terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); - - /** Deployment name. */ - public name: string; - - /** Deployment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Deployment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Deployment labels. */ - public labels: { [k: string]: string }; - - /** Deployment state. */ - public state: (google.cloud.config.v1.Deployment.State|keyof typeof google.cloud.config.v1.Deployment.State); - - /** Deployment latestRevision. */ - public latestRevision: string; - - /** Deployment stateDetail. */ - public stateDetail: string; - - /** Deployment errorCode. */ - public errorCode: (google.cloud.config.v1.Deployment.ErrorCode|keyof typeof google.cloud.config.v1.Deployment.ErrorCode); - - /** Deployment deleteResults. */ - public deleteResults?: (google.cloud.config.v1.IApplyResults|null); - - /** Deployment deleteBuild. */ - public deleteBuild: string; - - /** Deployment deleteLogs. */ - public deleteLogs: string; - - /** Deployment tfErrors. */ - public tfErrors: google.cloud.config.v1.ITerraformError[]; - - /** Deployment errorLogs. */ - public errorLogs: string; - - /** Deployment artifactsGcsBucket. */ - public artifactsGcsBucket?: (string|null); - - /** Deployment serviceAccount. */ - public serviceAccount?: (string|null); - - /** Deployment importExistingResources. */ - public importExistingResources?: (boolean|null); - - /** Deployment workerPool. */ - public workerPool?: (string|null); - - /** Deployment lockState. */ - public lockState: (google.cloud.config.v1.Deployment.LockState|keyof typeof google.cloud.config.v1.Deployment.LockState); - - /** Deployment tfVersionConstraint. */ - public tfVersionConstraint?: (string|null); - - /** Deployment tfVersion. */ - public tfVersion: string; - - /** Deployment quotaValidation. */ - public quotaValidation: (google.cloud.config.v1.QuotaValidation|keyof typeof google.cloud.config.v1.QuotaValidation); - - /** Deployment annotations. */ - public annotations: { [k: string]: string }; - - /** Deployment providerConfig. */ - public providerConfig?: (google.cloud.config.v1.IProviderConfig|null); - - /** Deployment blueprint. */ - public blueprint?: "terraformBlueprint"; - - /** - * Creates a new Deployment instance using the specified properties. - * @param [properties] Properties to set - * @returns Deployment instance - */ - public static create(properties?: google.cloud.config.v1.IDeployment): google.cloud.config.v1.Deployment; - - /** - * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.config.v1.Deployment.verify|verify} messages. - * @param message Deployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.config.v1.Deployment.verify|verify} messages. - * @param message Deployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Deployment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Deployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.Deployment; - - /** - * Decodes a Deployment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Deployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.Deployment; - - /** - * Verifies a Deployment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Deployment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Deployment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.Deployment; - - /** - * Creates a plain object from a Deployment message. Also converts values to other types if specified. - * @param message Deployment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.Deployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Deployment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Deployment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Deployment { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - UPDATING = 3, - DELETING = 4, - FAILED = 5, - SUSPENDED = 6, - DELETED = 7 - } - - /** ErrorCode enum. */ - enum ErrorCode { - ERROR_CODE_UNSPECIFIED = 0, - REVISION_FAILED = 1, - CLOUD_BUILD_PERMISSION_DENIED = 3, - DELETE_BUILD_API_FAILED = 5, - DELETE_BUILD_RUN_FAILED = 6, - BUCKET_CREATION_PERMISSION_DENIED = 7, - BUCKET_CREATION_FAILED = 8, - EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 10 - } - - /** LockState enum. */ - enum LockState { - LOCK_STATE_UNSPECIFIED = 0, - LOCKED = 1, - UNLOCKED = 2, - LOCKING = 3, - UNLOCKING = 4, - LOCK_FAILED = 5, - UNLOCK_FAILED = 6 - } - } - - /** Properties of a TerraformBlueprint. */ - interface ITerraformBlueprint { - - /** TerraformBlueprint gcsSource */ - gcsSource?: (string|null); - - /** TerraformBlueprint gitSource */ - gitSource?: (google.cloud.config.v1.IGitSource|null); - - /** TerraformBlueprint inputValues */ - inputValues?: ({ [k: string]: google.cloud.config.v1.ITerraformVariable }|null); - } - - /** Represents a TerraformBlueprint. */ - class TerraformBlueprint implements ITerraformBlueprint { - - /** - * Constructs a new TerraformBlueprint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.ITerraformBlueprint); - - /** TerraformBlueprint gcsSource. */ - public gcsSource?: (string|null); - - /** TerraformBlueprint gitSource. */ - public gitSource?: (google.cloud.config.v1.IGitSource|null); - - /** TerraformBlueprint inputValues. */ - public inputValues: { [k: string]: google.cloud.config.v1.ITerraformVariable }; - - /** TerraformBlueprint source. */ - public source?: ("gcsSource"|"gitSource"); - - /** - * Creates a new TerraformBlueprint instance using the specified properties. - * @param [properties] Properties to set - * @returns TerraformBlueprint instance - */ - public static create(properties?: google.cloud.config.v1.ITerraformBlueprint): google.cloud.config.v1.TerraformBlueprint; - - /** - * Encodes the specified TerraformBlueprint message. Does not implicitly {@link google.cloud.config.v1.TerraformBlueprint.verify|verify} messages. - * @param message TerraformBlueprint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.ITerraformBlueprint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TerraformBlueprint message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformBlueprint.verify|verify} messages. - * @param message TerraformBlueprint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.ITerraformBlueprint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TerraformBlueprint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TerraformBlueprint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.TerraformBlueprint; - - /** - * Decodes a TerraformBlueprint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TerraformBlueprint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.TerraformBlueprint; - - /** - * Verifies a TerraformBlueprint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TerraformBlueprint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TerraformBlueprint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.TerraformBlueprint; - - /** - * Creates a plain object from a TerraformBlueprint message. Also converts values to other types if specified. - * @param message TerraformBlueprint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.TerraformBlueprint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TerraformBlueprint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TerraformBlueprint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TerraformVariable. */ - interface ITerraformVariable { - - /** TerraformVariable inputValue */ - inputValue?: (google.protobuf.IValue|null); - } - - /** Represents a TerraformVariable. */ - class TerraformVariable implements ITerraformVariable { - - /** - * Constructs a new TerraformVariable. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.ITerraformVariable); - - /** TerraformVariable inputValue. */ - public inputValue?: (google.protobuf.IValue|null); - - /** - * Creates a new TerraformVariable instance using the specified properties. - * @param [properties] Properties to set - * @returns TerraformVariable instance - */ - public static create(properties?: google.cloud.config.v1.ITerraformVariable): google.cloud.config.v1.TerraformVariable; - - /** - * Encodes the specified TerraformVariable message. Does not implicitly {@link google.cloud.config.v1.TerraformVariable.verify|verify} messages. - * @param message TerraformVariable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.ITerraformVariable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TerraformVariable message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformVariable.verify|verify} messages. - * @param message TerraformVariable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.ITerraformVariable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TerraformVariable message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TerraformVariable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.TerraformVariable; - - /** - * Decodes a TerraformVariable message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TerraformVariable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.TerraformVariable; - - /** - * Verifies a TerraformVariable message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TerraformVariable message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TerraformVariable - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.TerraformVariable; - - /** - * Creates a plain object from a TerraformVariable message. Also converts values to other types if specified. - * @param message TerraformVariable - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.TerraformVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TerraformVariable to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TerraformVariable - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ApplyResults. */ - interface IApplyResults { - - /** ApplyResults content */ - content?: (string|null); - - /** ApplyResults artifacts */ - artifacts?: (string|null); - - /** ApplyResults outputs */ - outputs?: ({ [k: string]: google.cloud.config.v1.ITerraformOutput }|null); - } - - /** Represents an ApplyResults. */ - class ApplyResults implements IApplyResults { - - /** - * Constructs a new ApplyResults. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IApplyResults); - - /** ApplyResults content. */ - public content: string; - - /** ApplyResults artifacts. */ - public artifacts: string; - - /** ApplyResults outputs. */ - public outputs: { [k: string]: google.cloud.config.v1.ITerraformOutput }; - - /** - * Creates a new ApplyResults instance using the specified properties. - * @param [properties] Properties to set - * @returns ApplyResults instance - */ - public static create(properties?: google.cloud.config.v1.IApplyResults): google.cloud.config.v1.ApplyResults; - - /** - * Encodes the specified ApplyResults message. Does not implicitly {@link google.cloud.config.v1.ApplyResults.verify|verify} messages. - * @param message ApplyResults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IApplyResults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ApplyResults message, length delimited. Does not implicitly {@link google.cloud.config.v1.ApplyResults.verify|verify} messages. - * @param message ApplyResults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IApplyResults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ApplyResults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ApplyResults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ApplyResults; - - /** - * Decodes an ApplyResults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ApplyResults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ApplyResults; - - /** - * Verifies an ApplyResults message. - * @param message Plain 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 ApplyResults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ApplyResults - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ApplyResults; - - /** - * Creates a plain object from an ApplyResults message. Also converts values to other types if specified. - * @param message ApplyResults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ApplyResults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ApplyResults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ApplyResults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TerraformOutput. */ - interface ITerraformOutput { - - /** TerraformOutput sensitive */ - sensitive?: (boolean|null); - - /** TerraformOutput value */ - value?: (google.protobuf.IValue|null); - } - - /** Represents a TerraformOutput. */ - class TerraformOutput implements ITerraformOutput { - - /** - * Constructs a new TerraformOutput. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.ITerraformOutput); - - /** TerraformOutput sensitive. */ - public sensitive: boolean; - - /** TerraformOutput value. */ - public value?: (google.protobuf.IValue|null); - - /** - * Creates a new TerraformOutput instance using the specified properties. - * @param [properties] Properties to set - * @returns TerraformOutput instance - */ - public static create(properties?: google.cloud.config.v1.ITerraformOutput): google.cloud.config.v1.TerraformOutput; - - /** - * Encodes the specified TerraformOutput message. Does not implicitly {@link google.cloud.config.v1.TerraformOutput.verify|verify} messages. - * @param message TerraformOutput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.ITerraformOutput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TerraformOutput message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformOutput.verify|verify} messages. - * @param message TerraformOutput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.ITerraformOutput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TerraformOutput message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TerraformOutput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.TerraformOutput; - - /** - * Decodes a TerraformOutput message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TerraformOutput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.TerraformOutput; - - /** - * Verifies a TerraformOutput message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TerraformOutput message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TerraformOutput - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.TerraformOutput; - - /** - * Creates a plain object from a TerraformOutput message. Also converts values to other types if specified. - * @param message TerraformOutput - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.TerraformOutput, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TerraformOutput to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TerraformOutput - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDeploymentsRequest. */ - interface IListDeploymentsRequest { - - /** ListDeploymentsRequest parent */ - parent?: (string|null); - - /** ListDeploymentsRequest pageSize */ - pageSize?: (number|null); - - /** ListDeploymentsRequest pageToken */ - pageToken?: (string|null); - - /** ListDeploymentsRequest filter */ - filter?: (string|null); - - /** ListDeploymentsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListDeploymentsRequest. */ - class ListDeploymentsRequest implements IListDeploymentsRequest { - - /** - * Constructs a new ListDeploymentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListDeploymentsRequest); - - /** ListDeploymentsRequest parent. */ - public parent: string; - - /** ListDeploymentsRequest pageSize. */ - public pageSize: number; - - /** ListDeploymentsRequest pageToken. */ - public pageToken: string; - - /** ListDeploymentsRequest filter. */ - public filter: string; - - /** ListDeploymentsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListDeploymentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDeploymentsRequest instance - */ - public static create(properties?: google.cloud.config.v1.IListDeploymentsRequest): google.cloud.config.v1.ListDeploymentsRequest; - - /** - * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsRequest.verify|verify} messages. - * @param message ListDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsRequest.verify|verify} messages. - * @param message ListDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListDeploymentsRequest; - - /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListDeploymentsRequest; - - /** - * Verifies a ListDeploymentsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDeploymentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListDeploymentsRequest; - - /** - * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. - * @param message ListDeploymentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDeploymentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDeploymentsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDeploymentsResponse. */ - interface IListDeploymentsResponse { - - /** ListDeploymentsResponse deployments */ - deployments?: (google.cloud.config.v1.IDeployment[]|null); - - /** ListDeploymentsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListDeploymentsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListDeploymentsResponse. */ - class ListDeploymentsResponse implements IListDeploymentsResponse { - - /** - * Constructs a new ListDeploymentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListDeploymentsResponse); - - /** ListDeploymentsResponse deployments. */ - public deployments: google.cloud.config.v1.IDeployment[]; - - /** ListDeploymentsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListDeploymentsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListDeploymentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDeploymentsResponse instance - */ - public static create(properties?: google.cloud.config.v1.IListDeploymentsResponse): google.cloud.config.v1.ListDeploymentsResponse; - - /** - * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsResponse.verify|verify} messages. - * @param message ListDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsResponse.verify|verify} messages. - * @param message ListDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListDeploymentsResponse; - - /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListDeploymentsResponse; - - /** - * Verifies a ListDeploymentsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDeploymentsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListDeploymentsResponse; - - /** - * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. - * @param message ListDeploymentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDeploymentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDeploymentsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDeploymentRequest. */ - interface IGetDeploymentRequest { - - /** GetDeploymentRequest name */ - name?: (string|null); - } - - /** Represents a GetDeploymentRequest. */ - class GetDeploymentRequest implements IGetDeploymentRequest { - - /** - * Constructs a new GetDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IGetDeploymentRequest); - - /** GetDeploymentRequest name. */ - public name: string; - - /** - * Creates a new GetDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDeploymentRequest instance - */ - public static create(properties?: google.cloud.config.v1.IGetDeploymentRequest): google.cloud.config.v1.GetDeploymentRequest; - - /** - * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.GetDeploymentRequest.verify|verify} messages. - * @param message GetDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetDeploymentRequest.verify|verify} messages. - * @param message GetDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetDeploymentRequest; - - /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetDeploymentRequest; - - /** - * Verifies a GetDeploymentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetDeploymentRequest; - - /** - * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. - * @param message GetDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.GetDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListRevisionsRequest. */ - interface IListRevisionsRequest { - - /** ListRevisionsRequest parent */ - parent?: (string|null); - - /** ListRevisionsRequest pageSize */ - pageSize?: (number|null); - - /** ListRevisionsRequest pageToken */ - pageToken?: (string|null); - - /** ListRevisionsRequest filter */ - filter?: (string|null); - - /** ListRevisionsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListRevisionsRequest. */ - class ListRevisionsRequest implements IListRevisionsRequest { - - /** - * Constructs a new ListRevisionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListRevisionsRequest); - - /** ListRevisionsRequest parent. */ - public parent: string; - - /** ListRevisionsRequest pageSize. */ - public pageSize: number; - - /** ListRevisionsRequest pageToken. */ - public pageToken: string; - - /** ListRevisionsRequest filter. */ - public filter: string; - - /** ListRevisionsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListRevisionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRevisionsRequest instance - */ - public static create(properties?: google.cloud.config.v1.IListRevisionsRequest): google.cloud.config.v1.ListRevisionsRequest; - - /** - * Encodes the specified ListRevisionsRequest message. Does not implicitly {@link google.cloud.config.v1.ListRevisionsRequest.verify|verify} messages. - * @param message ListRevisionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListRevisionsRequest.verify|verify} messages. - * @param message ListRevisionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRevisionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListRevisionsRequest; - - /** - * Decodes a ListRevisionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListRevisionsRequest; - - /** - * Verifies a ListRevisionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListRevisionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRevisionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListRevisionsRequest; - - /** - * Creates a plain object from a ListRevisionsRequest message. Also converts values to other types if specified. - * @param message ListRevisionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRevisionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRevisionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListRevisionsResponse. */ - interface IListRevisionsResponse { - - /** ListRevisionsResponse revisions */ - revisions?: (google.cloud.config.v1.IRevision[]|null); - - /** ListRevisionsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListRevisionsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListRevisionsResponse. */ - class ListRevisionsResponse implements IListRevisionsResponse { - - /** - * Constructs a new ListRevisionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListRevisionsResponse); - - /** ListRevisionsResponse revisions. */ - public revisions: google.cloud.config.v1.IRevision[]; - - /** ListRevisionsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListRevisionsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListRevisionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListRevisionsResponse instance - */ - public static create(properties?: google.cloud.config.v1.IListRevisionsResponse): google.cloud.config.v1.ListRevisionsResponse; - - /** - * Encodes the specified ListRevisionsResponse message. Does not implicitly {@link google.cloud.config.v1.ListRevisionsResponse.verify|verify} messages. - * @param message ListRevisionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListRevisionsResponse.verify|verify} messages. - * @param message ListRevisionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListRevisionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListRevisionsResponse; - - /** - * Decodes a ListRevisionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListRevisionsResponse; - - /** - * Verifies a ListRevisionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListRevisionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListRevisionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListRevisionsResponse; - - /** - * Creates a plain object from a ListRevisionsResponse message. Also converts values to other types if specified. - * @param message ListRevisionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListRevisionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListRevisionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetRevisionRequest. */ - interface IGetRevisionRequest { - - /** GetRevisionRequest name */ - name?: (string|null); - } - - /** Represents a GetRevisionRequest. */ - class GetRevisionRequest implements IGetRevisionRequest { - - /** - * Constructs a new GetRevisionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IGetRevisionRequest); - - /** GetRevisionRequest name. */ - public name: string; - - /** - * Creates a new GetRevisionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRevisionRequest instance - */ - public static create(properties?: google.cloud.config.v1.IGetRevisionRequest): google.cloud.config.v1.GetRevisionRequest; - - /** - * Encodes the specified GetRevisionRequest message. Does not implicitly {@link google.cloud.config.v1.GetRevisionRequest.verify|verify} messages. - * @param message GetRevisionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IGetRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetRevisionRequest.verify|verify} messages. - * @param message GetRevisionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IGetRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetRevisionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetRevisionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetRevisionRequest; - - /** - * Decodes a GetRevisionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetRevisionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetRevisionRequest; - - /** - * Verifies a GetRevisionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetRevisionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetRevisionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetRevisionRequest; - - /** - * Creates a plain object from a GetRevisionRequest message. Also converts values to other types if specified. - * @param message GetRevisionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.GetRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetRevisionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetRevisionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateDeploymentRequest. */ - interface ICreateDeploymentRequest { - - /** CreateDeploymentRequest parent */ - parent?: (string|null); - - /** CreateDeploymentRequest deploymentId */ - deploymentId?: (string|null); - - /** CreateDeploymentRequest deployment */ - deployment?: (google.cloud.config.v1.IDeployment|null); - - /** CreateDeploymentRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateDeploymentRequest. */ - class CreateDeploymentRequest implements ICreateDeploymentRequest { - - /** - * Constructs a new CreateDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.ICreateDeploymentRequest); - - /** CreateDeploymentRequest parent. */ - public parent: string; - - /** CreateDeploymentRequest deploymentId. */ - public deploymentId: string; - - /** CreateDeploymentRequest deployment. */ - public deployment?: (google.cloud.config.v1.IDeployment|null); - - /** CreateDeploymentRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateDeploymentRequest instance - */ - public static create(properties?: google.cloud.config.v1.ICreateDeploymentRequest): google.cloud.config.v1.CreateDeploymentRequest; - - /** - * Encodes the specified CreateDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.CreateDeploymentRequest.verify|verify} messages. - * @param message CreateDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.ICreateDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.CreateDeploymentRequest.verify|verify} messages. - * @param message CreateDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.ICreateDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.CreateDeploymentRequest; - - /** - * Decodes a CreateDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.CreateDeploymentRequest; - - /** - * Verifies a CreateDeploymentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.CreateDeploymentRequest; - - /** - * Creates a plain object from a CreateDeploymentRequest message. Also converts values to other types if specified. - * @param message CreateDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.CreateDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateDeploymentRequest. */ - interface IUpdateDeploymentRequest { - - /** UpdateDeploymentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDeploymentRequest deployment */ - deployment?: (google.cloud.config.v1.IDeployment|null); - - /** UpdateDeploymentRequest requestId */ - requestId?: (string|null); - } - - /** Represents an UpdateDeploymentRequest. */ - class UpdateDeploymentRequest implements IUpdateDeploymentRequest { - - /** - * Constructs a new UpdateDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IUpdateDeploymentRequest); - - /** UpdateDeploymentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDeploymentRequest deployment. */ - public deployment?: (google.cloud.config.v1.IDeployment|null); - - /** UpdateDeploymentRequest requestId. */ - public requestId: string; - - /** - * Creates a new UpdateDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateDeploymentRequest instance - */ - public static create(properties?: google.cloud.config.v1.IUpdateDeploymentRequest): google.cloud.config.v1.UpdateDeploymentRequest; - - /** - * Encodes the specified UpdateDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.UpdateDeploymentRequest.verify|verify} messages. - * @param message UpdateDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IUpdateDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UpdateDeploymentRequest.verify|verify} messages. - * @param message UpdateDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IUpdateDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.UpdateDeploymentRequest; - - /** - * Decodes an UpdateDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.UpdateDeploymentRequest; - - /** - * Verifies an UpdateDeploymentRequest message. - * @param message Plain 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 UpdateDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.UpdateDeploymentRequest; - - /** - * Creates a plain object from an UpdateDeploymentRequest message. Also converts values to other types if specified. - * @param message UpdateDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.UpdateDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteDeploymentRequest. */ - interface IDeleteDeploymentRequest { - - /** DeleteDeploymentRequest name */ - name?: (string|null); - - /** DeleteDeploymentRequest requestId */ - requestId?: (string|null); - - /** DeleteDeploymentRequest force */ - force?: (boolean|null); - - /** DeleteDeploymentRequest deletePolicy */ - deletePolicy?: (google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy|keyof typeof google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy|null); - } - - /** Represents a DeleteDeploymentRequest. */ - class DeleteDeploymentRequest implements IDeleteDeploymentRequest { - - /** - * Constructs a new DeleteDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IDeleteDeploymentRequest); - - /** DeleteDeploymentRequest name. */ - public name: string; - - /** DeleteDeploymentRequest requestId. */ - public requestId: string; - - /** DeleteDeploymentRequest force. */ - public force: boolean; - - /** DeleteDeploymentRequest deletePolicy. */ - public deletePolicy: (google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy|keyof typeof google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy); - - /** - * Creates a new DeleteDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteDeploymentRequest instance - */ - public static create(properties?: google.cloud.config.v1.IDeleteDeploymentRequest): google.cloud.config.v1.DeleteDeploymentRequest; - - /** - * Encodes the specified DeleteDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.DeleteDeploymentRequest.verify|verify} messages. - * @param message DeleteDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IDeleteDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeleteDeploymentRequest.verify|verify} messages. - * @param message DeleteDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IDeleteDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.DeleteDeploymentRequest; - - /** - * Decodes a DeleteDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.DeleteDeploymentRequest; - - /** - * Verifies a DeleteDeploymentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.DeleteDeploymentRequest; - - /** - * Creates a plain object from a DeleteDeploymentRequest message. Also converts values to other types if specified. - * @param message DeleteDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.DeleteDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DeleteDeploymentRequest { - - /** DeletePolicy enum. */ - enum DeletePolicy { - DELETE_POLICY_UNSPECIFIED = 0, - DELETE = 1, - ABANDON = 2 - } - } - - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata deploymentMetadata */ - deploymentMetadata?: (google.cloud.config.v1.IDeploymentOperationMetadata|null); - - /** OperationMetadata previewMetadata */ - previewMetadata?: (google.cloud.config.v1.IPreviewOperationMetadata|null); - - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target */ - target?: (string|null); - - /** OperationMetadata verb */ - verb?: (string|null); - - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); - - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); - - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IOperationMetadata); - - /** OperationMetadata deploymentMetadata. */ - public deploymentMetadata?: (google.cloud.config.v1.IDeploymentOperationMetadata|null); - - /** OperationMetadata previewMetadata. */ - public previewMetadata?: (google.cloud.config.v1.IPreviewOperationMetadata|null); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target. */ - public target: string; - - /** OperationMetadata verb. */ - public verb: string; - - /** OperationMetadata statusMessage. */ - public statusMessage: string; - - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; - - /** OperationMetadata apiVersion. */ - public apiVersion: string; - - /** OperationMetadata resourceMetadata. */ - public resourceMetadata?: ("deploymentMetadata"|"previewMetadata"); - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.config.v1.IOperationMetadata): google.cloud.config.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.config.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.OperationMetadata; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.OperationMetadata; - - /** - * Verifies an OperationMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.OperationMetadata; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Revision. */ - interface IRevision { - - /** Revision terraformBlueprint */ - terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); - - /** Revision name */ - name?: (string|null); - - /** Revision createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Revision updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Revision action */ - action?: (google.cloud.config.v1.Revision.Action|keyof typeof google.cloud.config.v1.Revision.Action|null); - - /** Revision state */ - state?: (google.cloud.config.v1.Revision.State|keyof typeof google.cloud.config.v1.Revision.State|null); - - /** Revision applyResults */ - applyResults?: (google.cloud.config.v1.IApplyResults|null); - - /** Revision stateDetail */ - stateDetail?: (string|null); - - /** Revision errorCode */ - errorCode?: (google.cloud.config.v1.Revision.ErrorCode|keyof typeof google.cloud.config.v1.Revision.ErrorCode|null); - - /** Revision build */ - build?: (string|null); - - /** Revision logs */ - logs?: (string|null); - - /** Revision tfErrors */ - tfErrors?: (google.cloud.config.v1.ITerraformError[]|null); - - /** Revision errorLogs */ - errorLogs?: (string|null); - - /** Revision serviceAccount */ - serviceAccount?: (string|null); - - /** Revision importExistingResources */ - importExistingResources?: (boolean|null); - - /** Revision workerPool */ - workerPool?: (string|null); - - /** Revision tfVersionConstraint */ - tfVersionConstraint?: (string|null); - - /** Revision tfVersion */ - tfVersion?: (string|null); - - /** Revision quotaValidationResults */ - quotaValidationResults?: (string|null); - - /** Revision quotaValidation */ - quotaValidation?: (google.cloud.config.v1.QuotaValidation|keyof typeof google.cloud.config.v1.QuotaValidation|null); - - /** Revision providerConfig */ - providerConfig?: (google.cloud.config.v1.IProviderConfig|null); - } - - /** Represents a Revision. */ - class Revision implements IRevision { - - /** - * Constructs a new Revision. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IRevision); - - /** Revision terraformBlueprint. */ - public terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); - - /** Revision name. */ - public name: string; - - /** Revision createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Revision updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Revision action. */ - public action: (google.cloud.config.v1.Revision.Action|keyof typeof google.cloud.config.v1.Revision.Action); - - /** Revision state. */ - public state: (google.cloud.config.v1.Revision.State|keyof typeof google.cloud.config.v1.Revision.State); - - /** Revision applyResults. */ - public applyResults?: (google.cloud.config.v1.IApplyResults|null); - - /** Revision stateDetail. */ - public stateDetail: string; - - /** Revision errorCode. */ - public errorCode: (google.cloud.config.v1.Revision.ErrorCode|keyof typeof google.cloud.config.v1.Revision.ErrorCode); - - /** Revision build. */ - public build: string; - - /** Revision logs. */ - public logs: string; - - /** Revision tfErrors. */ - public tfErrors: google.cloud.config.v1.ITerraformError[]; - - /** Revision errorLogs. */ - public errorLogs: string; - - /** Revision serviceAccount. */ - public serviceAccount: string; - - /** Revision importExistingResources. */ - public importExistingResources: boolean; - - /** Revision workerPool. */ - public workerPool: string; - - /** Revision tfVersionConstraint. */ - public tfVersionConstraint: string; - - /** Revision tfVersion. */ - public tfVersion: string; - - /** Revision quotaValidationResults. */ - public quotaValidationResults: string; - - /** Revision quotaValidation. */ - public quotaValidation: (google.cloud.config.v1.QuotaValidation|keyof typeof google.cloud.config.v1.QuotaValidation); - - /** Revision providerConfig. */ - public providerConfig?: (google.cloud.config.v1.IProviderConfig|null); - - /** Revision blueprint. */ - public blueprint?: "terraformBlueprint"; - - /** - * Creates a new Revision instance using the specified properties. - * @param [properties] Properties to set - * @returns Revision instance - */ - public static create(properties?: google.cloud.config.v1.IRevision): google.cloud.config.v1.Revision; - - /** - * Encodes the specified Revision message. Does not implicitly {@link google.cloud.config.v1.Revision.verify|verify} messages. - * @param message Revision message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IRevision, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Revision message, length delimited. Does not implicitly {@link google.cloud.config.v1.Revision.verify|verify} messages. - * @param message Revision message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IRevision, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Revision message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Revision - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.Revision; - - /** - * Decodes a Revision message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Revision - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.Revision; - - /** - * Verifies a Revision message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Revision message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Revision - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.Revision; - - /** - * Creates a plain object from a Revision message. Also converts values to other types if specified. - * @param message Revision - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.Revision, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Revision to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Revision - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Revision { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - CREATE = 1, - UPDATE = 2, - DELETE = 3 - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - APPLYING = 1, - APPLIED = 2, - FAILED = 3 - } - - /** ErrorCode enum. */ - enum ErrorCode { - ERROR_CODE_UNSPECIFIED = 0, - CLOUD_BUILD_PERMISSION_DENIED = 1, - APPLY_BUILD_API_FAILED = 4, - APPLY_BUILD_RUN_FAILED = 5, - QUOTA_VALIDATION_FAILED = 7, - EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 8 - } - } - - /** Properties of a TerraformError. */ - interface ITerraformError { - - /** TerraformError resourceAddress */ - resourceAddress?: (string|null); - - /** TerraformError httpResponseCode */ - httpResponseCode?: (number|null); - - /** TerraformError errorDescription */ - errorDescription?: (string|null); - - /** TerraformError error */ - error?: (google.rpc.IStatus|null); - } - - /** Represents a TerraformError. */ - class TerraformError implements ITerraformError { - - /** - * Constructs a new TerraformError. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.ITerraformError); - - /** TerraformError resourceAddress. */ - public resourceAddress: string; - - /** TerraformError httpResponseCode. */ - public httpResponseCode: number; - - /** TerraformError errorDescription. */ - public errorDescription: string; - - /** TerraformError error. */ - public error?: (google.rpc.IStatus|null); - - /** - * Creates a new TerraformError instance using the specified properties. - * @param [properties] Properties to set - * @returns TerraformError instance - */ - public static create(properties?: google.cloud.config.v1.ITerraformError): google.cloud.config.v1.TerraformError; - - /** - * Encodes the specified TerraformError message. Does not implicitly {@link google.cloud.config.v1.TerraformError.verify|verify} messages. - * @param message TerraformError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.ITerraformError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TerraformError message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformError.verify|verify} messages. - * @param message TerraformError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.ITerraformError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TerraformError message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TerraformError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.TerraformError; - - /** - * Decodes a TerraformError message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TerraformError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.TerraformError; - - /** - * Verifies a TerraformError message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TerraformError message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TerraformError - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.TerraformError; - - /** - * Creates a plain object from a TerraformError message. Also converts values to other types if specified. - * @param message TerraformError - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.TerraformError, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TerraformError to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TerraformError - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GitSource. */ - interface IGitSource { - - /** GitSource repo */ - repo?: (string|null); - - /** GitSource directory */ - directory?: (string|null); - - /** GitSource ref */ - ref?: (string|null); - } - - /** Represents a GitSource. */ - class GitSource implements IGitSource { - - /** - * Constructs a new GitSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IGitSource); - - /** GitSource repo. */ - public repo?: (string|null); - - /** GitSource directory. */ - public directory?: (string|null); - - /** GitSource ref. */ - public ref?: (string|null); - - /** - * Creates a new GitSource instance using the specified properties. - * @param [properties] Properties to set - * @returns GitSource instance - */ - public static create(properties?: google.cloud.config.v1.IGitSource): google.cloud.config.v1.GitSource; - - /** - * Encodes the specified GitSource message. Does not implicitly {@link google.cloud.config.v1.GitSource.verify|verify} messages. - * @param message GitSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IGitSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GitSource message, length delimited. Does not implicitly {@link google.cloud.config.v1.GitSource.verify|verify} messages. - * @param message GitSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IGitSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GitSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GitSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GitSource; - - /** - * Decodes a GitSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GitSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GitSource; - - /** - * Verifies a GitSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GitSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GitSource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GitSource; - - /** - * Creates a plain object from a GitSource message. Also converts values to other types if specified. - * @param message GitSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.GitSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GitSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GitSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeploymentOperationMetadata. */ - interface IDeploymentOperationMetadata { - - /** DeploymentOperationMetadata step */ - step?: (google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep|keyof typeof google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep|null); - - /** DeploymentOperationMetadata applyResults */ - applyResults?: (google.cloud.config.v1.IApplyResults|null); - - /** DeploymentOperationMetadata build */ - build?: (string|null); - - /** DeploymentOperationMetadata logs */ - logs?: (string|null); - } - - /** Represents a DeploymentOperationMetadata. */ - class DeploymentOperationMetadata implements IDeploymentOperationMetadata { - - /** - * Constructs a new DeploymentOperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IDeploymentOperationMetadata); - - /** DeploymentOperationMetadata step. */ - public step: (google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep|keyof typeof google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep); - - /** DeploymentOperationMetadata applyResults. */ - public applyResults?: (google.cloud.config.v1.IApplyResults|null); - - /** DeploymentOperationMetadata build. */ - public build: string; - - /** DeploymentOperationMetadata logs. */ - public logs: string; - - /** - * Creates a new DeploymentOperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns DeploymentOperationMetadata instance - */ - public static create(properties?: google.cloud.config.v1.IDeploymentOperationMetadata): google.cloud.config.v1.DeploymentOperationMetadata; - - /** - * Encodes the specified DeploymentOperationMetadata message. Does not implicitly {@link google.cloud.config.v1.DeploymentOperationMetadata.verify|verify} messages. - * @param message DeploymentOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IDeploymentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeploymentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeploymentOperationMetadata.verify|verify} messages. - * @param message DeploymentOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IDeploymentOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeploymentOperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeploymentOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.DeploymentOperationMetadata; - - /** - * Decodes a DeploymentOperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeploymentOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.DeploymentOperationMetadata; - - /** - * Verifies a DeploymentOperationMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeploymentOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeploymentOperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.DeploymentOperationMetadata; - - /** - * Creates a plain object from a DeploymentOperationMetadata message. Also converts values to other types if specified. - * @param message DeploymentOperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.DeploymentOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeploymentOperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeploymentOperationMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DeploymentOperationMetadata { - - /** DeploymentStep enum. */ - enum DeploymentStep { - DEPLOYMENT_STEP_UNSPECIFIED = 0, - PREPARING_STORAGE_BUCKET = 1, - DOWNLOADING_BLUEPRINT = 2, - RUNNING_TF_INIT = 3, - RUNNING_TF_PLAN = 4, - RUNNING_TF_APPLY = 5, - RUNNING_TF_DESTROY = 6, - RUNNING_TF_VALIDATE = 7, - UNLOCKING_DEPLOYMENT = 8, - SUCCEEDED = 9, - FAILED = 10, - VALIDATING_REPOSITORY = 11, - RUNNING_QUOTA_VALIDATION = 12 - } - } - - /** Properties of a Resource. */ - interface IResource { - - /** Resource name */ - name?: (string|null); - - /** Resource terraformInfo */ - terraformInfo?: (google.cloud.config.v1.IResourceTerraformInfo|null); - - /** Resource caiAssets */ - caiAssets?: ({ [k: string]: google.cloud.config.v1.IResourceCAIInfo }|null); - - /** Resource intent */ - intent?: (google.cloud.config.v1.Resource.Intent|keyof typeof google.cloud.config.v1.Resource.Intent|null); - - /** Resource state */ - state?: (google.cloud.config.v1.Resource.State|keyof typeof google.cloud.config.v1.Resource.State|null); - } - - /** Represents a Resource. */ - class Resource implements IResource { - - /** - * Constructs a new Resource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IResource); - - /** Resource name. */ - public name: string; - - /** Resource terraformInfo. */ - public terraformInfo?: (google.cloud.config.v1.IResourceTerraformInfo|null); - - /** Resource caiAssets. */ - public caiAssets: { [k: string]: google.cloud.config.v1.IResourceCAIInfo }; - - /** Resource intent. */ - public intent: (google.cloud.config.v1.Resource.Intent|keyof typeof google.cloud.config.v1.Resource.Intent); - - /** Resource state. */ - public state: (google.cloud.config.v1.Resource.State|keyof typeof google.cloud.config.v1.Resource.State); - - /** - * Creates a new Resource instance using the specified properties. - * @param [properties] Properties to set - * @returns Resource instance - */ - public static create(properties?: google.cloud.config.v1.IResource): google.cloud.config.v1.Resource; - - /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.config.v1.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.config.v1.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Resource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Resource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.Resource; - - /** - * Decodes a Resource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Resource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.Resource; - - /** - * Verifies a Resource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Resource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.Resource; - - /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @param message Resource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Resource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Resource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Resource { - - /** Intent enum. */ - enum Intent { - INTENT_UNSPECIFIED = 0, - CREATE = 1, - UPDATE = 2, - DELETE = 3, - RECREATE = 4, - UNCHANGED = 5 - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - PLANNED = 1, - IN_PROGRESS = 2, - RECONCILED = 3, - FAILED = 4 - } - } - - /** Properties of a ResourceTerraformInfo. */ - interface IResourceTerraformInfo { - - /** ResourceTerraformInfo address */ - address?: (string|null); - - /** ResourceTerraformInfo type */ - type?: (string|null); - - /** ResourceTerraformInfo id */ - id?: (string|null); - } - - /** Represents a ResourceTerraformInfo. */ - class ResourceTerraformInfo implements IResourceTerraformInfo { - - /** - * Constructs a new ResourceTerraformInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IResourceTerraformInfo); - - /** ResourceTerraformInfo address. */ - public address: string; - - /** ResourceTerraformInfo type. */ - public type: string; - - /** ResourceTerraformInfo id. */ - public id: string; - - /** - * Creates a new ResourceTerraformInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceTerraformInfo instance - */ - public static create(properties?: google.cloud.config.v1.IResourceTerraformInfo): google.cloud.config.v1.ResourceTerraformInfo; - - /** - * Encodes the specified ResourceTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceTerraformInfo.verify|verify} messages. - * @param message ResourceTerraformInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IResourceTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceTerraformInfo.verify|verify} messages. - * @param message ResourceTerraformInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IResourceTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceTerraformInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceTerraformInfo; - - /** - * Decodes a ResourceTerraformInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceTerraformInfo; - - /** - * Verifies a ResourceTerraformInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceTerraformInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceTerraformInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceTerraformInfo; - - /** - * Creates a plain object from a ResourceTerraformInfo message. Also converts values to other types if specified. - * @param message ResourceTerraformInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ResourceTerraformInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceTerraformInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceTerraformInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceCAIInfo. */ - interface IResourceCAIInfo { - - /** ResourceCAIInfo fullResourceName */ - fullResourceName?: (string|null); - } - - /** Represents a ResourceCAIInfo. */ - class ResourceCAIInfo implements IResourceCAIInfo { - - /** - * Constructs a new ResourceCAIInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IResourceCAIInfo); - - /** ResourceCAIInfo fullResourceName. */ - public fullResourceName: string; - - /** - * Creates a new ResourceCAIInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceCAIInfo instance - */ - public static create(properties?: google.cloud.config.v1.IResourceCAIInfo): google.cloud.config.v1.ResourceCAIInfo; - - /** - * Encodes the specified ResourceCAIInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceCAIInfo.verify|verify} messages. - * @param message ResourceCAIInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IResourceCAIInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceCAIInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceCAIInfo.verify|verify} messages. - * @param message ResourceCAIInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IResourceCAIInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceCAIInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceCAIInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceCAIInfo; - - /** - * Decodes a ResourceCAIInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceCAIInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceCAIInfo; - - /** - * Verifies a ResourceCAIInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceCAIInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceCAIInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceCAIInfo; - - /** - * Creates a plain object from a ResourceCAIInfo message. Also converts values to other types if specified. - * @param message ResourceCAIInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ResourceCAIInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceCAIInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceCAIInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetResourceRequest. */ - interface IGetResourceRequest { - - /** GetResourceRequest name */ - name?: (string|null); - } - - /** Represents a GetResourceRequest. */ - class GetResourceRequest implements IGetResourceRequest { - - /** - * Constructs a new GetResourceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IGetResourceRequest); - - /** GetResourceRequest name. */ - public name: string; - - /** - * Creates a new GetResourceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetResourceRequest instance - */ - public static create(properties?: google.cloud.config.v1.IGetResourceRequest): google.cloud.config.v1.GetResourceRequest; - - /** - * Encodes the specified GetResourceRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceRequest.verify|verify} messages. - * @param message GetResourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IGetResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetResourceRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceRequest.verify|verify} messages. - * @param message GetResourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IGetResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetResourceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetResourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetResourceRequest; - - /** - * Decodes a GetResourceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetResourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetResourceRequest; - - /** - * Verifies a GetResourceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetResourceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetResourceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetResourceRequest; - - /** - * Creates a plain object from a GetResourceRequest message. Also converts values to other types if specified. - * @param message GetResourceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.GetResourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetResourceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetResourceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListResourcesRequest. */ - interface IListResourcesRequest { - - /** ListResourcesRequest parent */ - parent?: (string|null); - - /** ListResourcesRequest pageSize */ - pageSize?: (number|null); - - /** ListResourcesRequest pageToken */ - pageToken?: (string|null); - - /** ListResourcesRequest filter */ - filter?: (string|null); - - /** ListResourcesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListResourcesRequest. */ - class ListResourcesRequest implements IListResourcesRequest { - - /** - * Constructs a new ListResourcesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListResourcesRequest); - - /** ListResourcesRequest parent. */ - public parent: string; - - /** ListResourcesRequest pageSize. */ - public pageSize: number; - - /** ListResourcesRequest pageToken. */ - public pageToken: string; - - /** ListResourcesRequest filter. */ - public filter: string; - - /** ListResourcesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListResourcesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListResourcesRequest instance - */ - public static create(properties?: google.cloud.config.v1.IListResourcesRequest): google.cloud.config.v1.ListResourcesRequest; - - /** - * Encodes the specified ListResourcesRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourcesRequest.verify|verify} messages. - * @param message ListResourcesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourcesRequest.verify|verify} messages. - * @param message ListResourcesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListResourcesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListResourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourcesRequest; - - /** - * Decodes a ListResourcesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListResourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourcesRequest; - - /** - * Verifies a ListResourcesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListResourcesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListResourcesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourcesRequest; - - /** - * Creates a plain object from a ListResourcesRequest message. Also converts values to other types if specified. - * @param message ListResourcesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListResourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListResourcesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListResourcesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListResourcesResponse. */ - interface IListResourcesResponse { - - /** ListResourcesResponse resources */ - resources?: (google.cloud.config.v1.IResource[]|null); - - /** ListResourcesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListResourcesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListResourcesResponse. */ - class ListResourcesResponse implements IListResourcesResponse { - - /** - * Constructs a new ListResourcesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListResourcesResponse); - - /** ListResourcesResponse resources. */ - public resources: google.cloud.config.v1.IResource[]; - - /** ListResourcesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListResourcesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListResourcesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListResourcesResponse instance - */ - public static create(properties?: google.cloud.config.v1.IListResourcesResponse): google.cloud.config.v1.ListResourcesResponse; - - /** - * Encodes the specified ListResourcesResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourcesResponse.verify|verify} messages. - * @param message ListResourcesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourcesResponse.verify|verify} messages. - * @param message ListResourcesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListResourcesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListResourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourcesResponse; - - /** - * Decodes a ListResourcesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListResourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourcesResponse; - - /** - * Verifies a ListResourcesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListResourcesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListResourcesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourcesResponse; - - /** - * Creates a plain object from a ListResourcesResponse message. Also converts values to other types if specified. - * @param message ListResourcesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListResourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListResourcesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListResourcesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Statefile. */ - interface IStatefile { - - /** Statefile signedUri */ - signedUri?: (string|null); - } - - /** Represents a Statefile. */ - class Statefile implements IStatefile { - - /** - * Constructs a new Statefile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IStatefile); - - /** Statefile signedUri. */ - public signedUri: string; - - /** - * Creates a new Statefile instance using the specified properties. - * @param [properties] Properties to set - * @returns Statefile instance - */ - public static create(properties?: google.cloud.config.v1.IStatefile): google.cloud.config.v1.Statefile; - - /** - * Encodes the specified Statefile message. Does not implicitly {@link google.cloud.config.v1.Statefile.verify|verify} messages. - * @param message Statefile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IStatefile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Statefile message, length delimited. Does not implicitly {@link google.cloud.config.v1.Statefile.verify|verify} messages. - * @param message Statefile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IStatefile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Statefile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Statefile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.Statefile; - - /** - * Decodes a Statefile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Statefile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.Statefile; - - /** - * Verifies a Statefile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Statefile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Statefile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.Statefile; - - /** - * Creates a plain object from a Statefile message. Also converts values to other types if specified. - * @param message Statefile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.Statefile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Statefile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Statefile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportDeploymentStatefileRequest. */ - interface IExportDeploymentStatefileRequest { - - /** ExportDeploymentStatefileRequest parent */ - parent?: (string|null); - - /** ExportDeploymentStatefileRequest draft */ - draft?: (boolean|null); - } - - /** Represents an ExportDeploymentStatefileRequest. */ - class ExportDeploymentStatefileRequest implements IExportDeploymentStatefileRequest { - - /** - * Constructs a new ExportDeploymentStatefileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IExportDeploymentStatefileRequest); - - /** ExportDeploymentStatefileRequest parent. */ - public parent: string; - - /** ExportDeploymentStatefileRequest draft. */ - public draft: boolean; - - /** - * Creates a new ExportDeploymentStatefileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportDeploymentStatefileRequest instance - */ - public static create(properties?: google.cloud.config.v1.IExportDeploymentStatefileRequest): google.cloud.config.v1.ExportDeploymentStatefileRequest; - - /** - * Encodes the specified ExportDeploymentStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ExportDeploymentStatefileRequest.verify|verify} messages. - * @param message ExportDeploymentStatefileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IExportDeploymentStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportDeploymentStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportDeploymentStatefileRequest.verify|verify} messages. - * @param message ExportDeploymentStatefileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IExportDeploymentStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportDeploymentStatefileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportDeploymentStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ExportDeploymentStatefileRequest; - - /** - * Decodes an ExportDeploymentStatefileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportDeploymentStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ExportDeploymentStatefileRequest; - - /** - * Verifies an ExportDeploymentStatefileRequest message. - * @param message Plain 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 ExportDeploymentStatefileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportDeploymentStatefileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ExportDeploymentStatefileRequest; - - /** - * Creates a plain object from an ExportDeploymentStatefileRequest message. Also converts values to other types if specified. - * @param message ExportDeploymentStatefileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ExportDeploymentStatefileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportDeploymentStatefileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportDeploymentStatefileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportRevisionStatefileRequest. */ - interface IExportRevisionStatefileRequest { - - /** ExportRevisionStatefileRequest parent */ - parent?: (string|null); - } - - /** Represents an ExportRevisionStatefileRequest. */ - class ExportRevisionStatefileRequest implements IExportRevisionStatefileRequest { - - /** - * Constructs a new ExportRevisionStatefileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IExportRevisionStatefileRequest); - - /** ExportRevisionStatefileRequest parent. */ - public parent: string; - - /** - * Creates a new ExportRevisionStatefileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportRevisionStatefileRequest instance - */ - public static create(properties?: google.cloud.config.v1.IExportRevisionStatefileRequest): google.cloud.config.v1.ExportRevisionStatefileRequest; - - /** - * Encodes the specified ExportRevisionStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ExportRevisionStatefileRequest.verify|verify} messages. - * @param message ExportRevisionStatefileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IExportRevisionStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportRevisionStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportRevisionStatefileRequest.verify|verify} messages. - * @param message ExportRevisionStatefileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IExportRevisionStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportRevisionStatefileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportRevisionStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ExportRevisionStatefileRequest; - - /** - * Decodes an ExportRevisionStatefileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportRevisionStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ExportRevisionStatefileRequest; - - /** - * Verifies an ExportRevisionStatefileRequest message. - * @param message Plain 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 ExportRevisionStatefileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportRevisionStatefileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ExportRevisionStatefileRequest; - - /** - * Creates a plain object from an ExportRevisionStatefileRequest message. Also converts values to other types if specified. - * @param message ExportRevisionStatefileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ExportRevisionStatefileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportRevisionStatefileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportRevisionStatefileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportStatefileRequest. */ - interface IImportStatefileRequest { - - /** ImportStatefileRequest parent */ - parent?: (string|null); - - /** ImportStatefileRequest lockId */ - lockId?: (number|Long|string|null); - - /** ImportStatefileRequest skipDraft */ - skipDraft?: (boolean|null); - } - - /** Represents an ImportStatefileRequest. */ - class ImportStatefileRequest implements IImportStatefileRequest { - - /** - * Constructs a new ImportStatefileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IImportStatefileRequest); - - /** ImportStatefileRequest parent. */ - public parent: string; - - /** ImportStatefileRequest lockId. */ - public lockId: (number|Long|string); - - /** ImportStatefileRequest skipDraft. */ - public skipDraft: boolean; - - /** - * Creates a new ImportStatefileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportStatefileRequest instance - */ - public static create(properties?: google.cloud.config.v1.IImportStatefileRequest): google.cloud.config.v1.ImportStatefileRequest; - - /** - * Encodes the specified ImportStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ImportStatefileRequest.verify|verify} messages. - * @param message ImportStatefileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IImportStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ImportStatefileRequest.verify|verify} messages. - * @param message ImportStatefileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IImportStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportStatefileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ImportStatefileRequest; - - /** - * Decodes an ImportStatefileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ImportStatefileRequest; - - /** - * Verifies an ImportStatefileRequest message. - * @param message Plain 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 ImportStatefileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportStatefileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ImportStatefileRequest; - - /** - * Creates a plain object from an ImportStatefileRequest message. Also converts values to other types if specified. - * @param message ImportStatefileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ImportStatefileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportStatefileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportStatefileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteStatefileRequest. */ - interface IDeleteStatefileRequest { - - /** DeleteStatefileRequest name */ - name?: (string|null); - - /** DeleteStatefileRequest lockId */ - lockId?: (number|Long|string|null); - } - - /** Represents a DeleteStatefileRequest. */ - class DeleteStatefileRequest implements IDeleteStatefileRequest { - - /** - * Constructs a new DeleteStatefileRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IDeleteStatefileRequest); - - /** DeleteStatefileRequest name. */ - public name: string; - - /** DeleteStatefileRequest lockId. */ - public lockId: (number|Long|string); - - /** - * Creates a new DeleteStatefileRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteStatefileRequest instance - */ - public static create(properties?: google.cloud.config.v1.IDeleteStatefileRequest): google.cloud.config.v1.DeleteStatefileRequest; - - /** - * Encodes the specified DeleteStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.DeleteStatefileRequest.verify|verify} messages. - * @param message DeleteStatefileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IDeleteStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeleteStatefileRequest.verify|verify} messages. - * @param message DeleteStatefileRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IDeleteStatefileRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteStatefileRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.DeleteStatefileRequest; - - /** - * Decodes a DeleteStatefileRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.DeleteStatefileRequest; - - /** - * Verifies a DeleteStatefileRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteStatefileRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteStatefileRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.DeleteStatefileRequest; - - /** - * Creates a plain object from a DeleteStatefileRequest message. Also converts values to other types if specified. - * @param message DeleteStatefileRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.DeleteStatefileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteStatefileRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteStatefileRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LockDeploymentRequest. */ - interface ILockDeploymentRequest { - - /** LockDeploymentRequest name */ - name?: (string|null); - } - - /** Represents a LockDeploymentRequest. */ - class LockDeploymentRequest implements ILockDeploymentRequest { - - /** - * Constructs a new LockDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.ILockDeploymentRequest); - - /** LockDeploymentRequest name. */ - public name: string; - - /** - * Creates a new LockDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns LockDeploymentRequest instance - */ - public static create(properties?: google.cloud.config.v1.ILockDeploymentRequest): google.cloud.config.v1.LockDeploymentRequest; - - /** - * Encodes the specified LockDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.LockDeploymentRequest.verify|verify} messages. - * @param message LockDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.ILockDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LockDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.LockDeploymentRequest.verify|verify} messages. - * @param message LockDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.ILockDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LockDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LockDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.LockDeploymentRequest; - - /** - * Decodes a LockDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LockDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.LockDeploymentRequest; - - /** - * Verifies a LockDeploymentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LockDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LockDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.LockDeploymentRequest; - - /** - * Creates a plain object from a LockDeploymentRequest message. Also converts values to other types if specified. - * @param message LockDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.LockDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LockDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LockDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UnlockDeploymentRequest. */ - interface IUnlockDeploymentRequest { - - /** UnlockDeploymentRequest name */ - name?: (string|null); - - /** UnlockDeploymentRequest lockId */ - lockId?: (number|Long|string|null); - } - - /** Represents an UnlockDeploymentRequest. */ - class UnlockDeploymentRequest implements IUnlockDeploymentRequest { - - /** - * Constructs a new UnlockDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IUnlockDeploymentRequest); - - /** UnlockDeploymentRequest name. */ - public name: string; - - /** UnlockDeploymentRequest lockId. */ - public lockId: (number|Long|string); - - /** - * Creates a new UnlockDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UnlockDeploymentRequest instance - */ - public static create(properties?: google.cloud.config.v1.IUnlockDeploymentRequest): google.cloud.config.v1.UnlockDeploymentRequest; - - /** - * Encodes the specified UnlockDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.UnlockDeploymentRequest.verify|verify} messages. - * @param message UnlockDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IUnlockDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnlockDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UnlockDeploymentRequest.verify|verify} messages. - * @param message UnlockDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IUnlockDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnlockDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnlockDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.UnlockDeploymentRequest; - - /** - * Decodes an UnlockDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnlockDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.UnlockDeploymentRequest; - - /** - * Verifies an UnlockDeploymentRequest message. - * @param message Plain 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 UnlockDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnlockDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.UnlockDeploymentRequest; - - /** - * Creates a plain object from an UnlockDeploymentRequest message. Also converts values to other types if specified. - * @param message UnlockDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.UnlockDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnlockDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnlockDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportLockInfoRequest. */ - interface IExportLockInfoRequest { - - /** ExportLockInfoRequest name */ - name?: (string|null); - } - - /** Represents an ExportLockInfoRequest. */ - class ExportLockInfoRequest implements IExportLockInfoRequest { - - /** - * Constructs a new ExportLockInfoRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IExportLockInfoRequest); - - /** ExportLockInfoRequest name. */ - public name: string; - - /** - * Creates a new ExportLockInfoRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportLockInfoRequest instance - */ - public static create(properties?: google.cloud.config.v1.IExportLockInfoRequest): google.cloud.config.v1.ExportLockInfoRequest; - - /** - * Encodes the specified ExportLockInfoRequest message. Does not implicitly {@link google.cloud.config.v1.ExportLockInfoRequest.verify|verify} messages. - * @param message ExportLockInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IExportLockInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportLockInfoRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportLockInfoRequest.verify|verify} messages. - * @param message ExportLockInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IExportLockInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportLockInfoRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportLockInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ExportLockInfoRequest; - - /** - * Decodes an ExportLockInfoRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportLockInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ExportLockInfoRequest; - - /** - * Verifies an ExportLockInfoRequest message. - * @param message Plain 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 ExportLockInfoRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportLockInfoRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ExportLockInfoRequest; - - /** - * Creates a plain object from an ExportLockInfoRequest message. Also converts values to other types if specified. - * @param message ExportLockInfoRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ExportLockInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportLockInfoRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportLockInfoRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LockInfo. */ - interface ILockInfo { - - /** LockInfo lockId */ - lockId?: (number|Long|string|null); - - /** LockInfo operation */ - operation?: (string|null); - - /** LockInfo info */ - info?: (string|null); - - /** LockInfo who */ - who?: (string|null); - - /** LockInfo version */ - version?: (string|null); - - /** LockInfo createTime */ - createTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a LockInfo. */ - class LockInfo implements ILockInfo { - - /** - * Constructs a new LockInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.ILockInfo); - - /** LockInfo lockId. */ - public lockId: (number|Long|string); - - /** LockInfo operation. */ - public operation: string; - - /** LockInfo info. */ - public info: string; - - /** LockInfo who. */ - public who: string; - - /** LockInfo version. */ - public version: string; - - /** LockInfo createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new LockInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns LockInfo instance - */ - public static create(properties?: google.cloud.config.v1.ILockInfo): google.cloud.config.v1.LockInfo; - - /** - * Encodes the specified LockInfo message. Does not implicitly {@link google.cloud.config.v1.LockInfo.verify|verify} messages. - * @param message LockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.ILockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LockInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.LockInfo.verify|verify} messages. - * @param message LockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.ILockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LockInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.LockInfo; - - /** - * Decodes a LockInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.LockInfo; - - /** - * Verifies a LockInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LockInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LockInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.LockInfo; - - /** - * Creates a plain object from a LockInfo message. Also converts values to other types if specified. - * @param message LockInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.LockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LockInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LockInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Preview. */ - interface IPreview { - - /** Preview terraformBlueprint */ - terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); - - /** Preview name */ - name?: (string|null); - - /** Preview createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Preview labels */ - labels?: ({ [k: string]: string }|null); - - /** Preview state */ - state?: (google.cloud.config.v1.Preview.State|keyof typeof google.cloud.config.v1.Preview.State|null); - - /** Preview deployment */ - deployment?: (string|null); - - /** Preview previewMode */ - previewMode?: (google.cloud.config.v1.Preview.PreviewMode|keyof typeof google.cloud.config.v1.Preview.PreviewMode|null); - - /** Preview serviceAccount */ - serviceAccount?: (string|null); - - /** Preview artifactsGcsBucket */ - artifactsGcsBucket?: (string|null); - - /** Preview workerPool */ - workerPool?: (string|null); - - /** Preview errorCode */ - errorCode?: (google.cloud.config.v1.Preview.ErrorCode|keyof typeof google.cloud.config.v1.Preview.ErrorCode|null); - - /** Preview errorStatus */ - errorStatus?: (google.rpc.IStatus|null); - - /** Preview build */ - build?: (string|null); - - /** Preview tfErrors */ - tfErrors?: (google.cloud.config.v1.ITerraformError[]|null); - - /** Preview errorLogs */ - errorLogs?: (string|null); - - /** Preview previewArtifacts */ - previewArtifacts?: (google.cloud.config.v1.IPreviewArtifacts|null); - - /** Preview logs */ - logs?: (string|null); - - /** Preview tfVersion */ - tfVersion?: (string|null); - - /** Preview tfVersionConstraint */ - tfVersionConstraint?: (string|null); - - /** Preview annotations */ - annotations?: ({ [k: string]: string }|null); - - /** Preview providerConfig */ - providerConfig?: (google.cloud.config.v1.IProviderConfig|null); - } - - /** Represents a Preview. */ - class Preview implements IPreview { - - /** - * Constructs a new Preview. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IPreview); - - /** Preview terraformBlueprint. */ - public terraformBlueprint?: (google.cloud.config.v1.ITerraformBlueprint|null); - - /** Preview name. */ - public name: string; - - /** Preview createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Preview labels. */ - public labels: { [k: string]: string }; - - /** Preview state. */ - public state: (google.cloud.config.v1.Preview.State|keyof typeof google.cloud.config.v1.Preview.State); - - /** Preview deployment. */ - public deployment: string; - - /** Preview previewMode. */ - public previewMode: (google.cloud.config.v1.Preview.PreviewMode|keyof typeof google.cloud.config.v1.Preview.PreviewMode); - - /** Preview serviceAccount. */ - public serviceAccount: string; - - /** Preview artifactsGcsBucket. */ - public artifactsGcsBucket?: (string|null); - - /** Preview workerPool. */ - public workerPool?: (string|null); - - /** Preview errorCode. */ - public errorCode: (google.cloud.config.v1.Preview.ErrorCode|keyof typeof google.cloud.config.v1.Preview.ErrorCode); - - /** Preview errorStatus. */ - public errorStatus?: (google.rpc.IStatus|null); - - /** Preview build. */ - public build: string; - - /** Preview tfErrors. */ - public tfErrors: google.cloud.config.v1.ITerraformError[]; - - /** Preview errorLogs. */ - public errorLogs: string; - - /** Preview previewArtifacts. */ - public previewArtifacts?: (google.cloud.config.v1.IPreviewArtifacts|null); - - /** Preview logs. */ - public logs: string; - - /** Preview tfVersion. */ - public tfVersion: string; - - /** Preview tfVersionConstraint. */ - public tfVersionConstraint?: (string|null); - - /** Preview annotations. */ - public annotations: { [k: string]: string }; - - /** Preview providerConfig. */ - public providerConfig?: (google.cloud.config.v1.IProviderConfig|null); - - /** Preview blueprint. */ - public blueprint?: "terraformBlueprint"; - - /** - * Creates a new Preview instance using the specified properties. - * @param [properties] Properties to set - * @returns Preview instance - */ - public static create(properties?: google.cloud.config.v1.IPreview): google.cloud.config.v1.Preview; - - /** - * Encodes the specified Preview message. Does not implicitly {@link google.cloud.config.v1.Preview.verify|verify} messages. - * @param message Preview message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IPreview, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Preview message, length delimited. Does not implicitly {@link google.cloud.config.v1.Preview.verify|verify} messages. - * @param message Preview message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IPreview, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Preview message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Preview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.Preview; - - /** - * Decodes a Preview message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Preview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.Preview; - - /** - * Verifies a Preview message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Preview message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Preview - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.Preview; - - /** - * Creates a plain object from a Preview message. Also converts values to other types if specified. - * @param message Preview - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.Preview, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Preview to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Preview - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Preview { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - SUCCEEDED = 2, - APPLYING = 3, - STALE = 4, - DELETING = 5, - FAILED = 6, - DELETED = 7 - } - - /** PreviewMode enum. */ - enum PreviewMode { - PREVIEW_MODE_UNSPECIFIED = 0, - DEFAULT = 1, - DELETE = 2 - } - - /** ErrorCode enum. */ - enum ErrorCode { - ERROR_CODE_UNSPECIFIED = 0, - CLOUD_BUILD_PERMISSION_DENIED = 1, - BUCKET_CREATION_PERMISSION_DENIED = 2, - BUCKET_CREATION_FAILED = 3, - DEPLOYMENT_LOCK_ACQUIRE_FAILED = 4, - PREVIEW_BUILD_API_FAILED = 5, - PREVIEW_BUILD_RUN_FAILED = 6, - EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 7 - } - } - - /** Properties of a PreviewOperationMetadata. */ - interface IPreviewOperationMetadata { - - /** PreviewOperationMetadata step */ - step?: (google.cloud.config.v1.PreviewOperationMetadata.PreviewStep|keyof typeof google.cloud.config.v1.PreviewOperationMetadata.PreviewStep|null); - - /** PreviewOperationMetadata previewArtifacts */ - previewArtifacts?: (google.cloud.config.v1.IPreviewArtifacts|null); - - /** PreviewOperationMetadata logs */ - logs?: (string|null); - - /** PreviewOperationMetadata build */ - build?: (string|null); - } - - /** Represents a PreviewOperationMetadata. */ - class PreviewOperationMetadata implements IPreviewOperationMetadata { - - /** - * Constructs a new PreviewOperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IPreviewOperationMetadata); - - /** PreviewOperationMetadata step. */ - public step: (google.cloud.config.v1.PreviewOperationMetadata.PreviewStep|keyof typeof google.cloud.config.v1.PreviewOperationMetadata.PreviewStep); - - /** PreviewOperationMetadata previewArtifacts. */ - public previewArtifacts?: (google.cloud.config.v1.IPreviewArtifacts|null); - - /** PreviewOperationMetadata logs. */ - public logs: string; - - /** PreviewOperationMetadata build. */ - public build: string; - - /** - * Creates a new PreviewOperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns PreviewOperationMetadata instance - */ - public static create(properties?: google.cloud.config.v1.IPreviewOperationMetadata): google.cloud.config.v1.PreviewOperationMetadata; - - /** - * Encodes the specified PreviewOperationMetadata message. Does not implicitly {@link google.cloud.config.v1.PreviewOperationMetadata.verify|verify} messages. - * @param message PreviewOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IPreviewOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PreviewOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewOperationMetadata.verify|verify} messages. - * @param message PreviewOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IPreviewOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PreviewOperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PreviewOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.PreviewOperationMetadata; - - /** - * Decodes a PreviewOperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PreviewOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.PreviewOperationMetadata; - - /** - * Verifies a PreviewOperationMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PreviewOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PreviewOperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PreviewOperationMetadata; - - /** - * Creates a plain object from a PreviewOperationMetadata message. Also converts values to other types if specified. - * @param message PreviewOperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.PreviewOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PreviewOperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PreviewOperationMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PreviewOperationMetadata { - - /** PreviewStep enum. */ - enum PreviewStep { - PREVIEW_STEP_UNSPECIFIED = 0, - PREPARING_STORAGE_BUCKET = 1, - DOWNLOADING_BLUEPRINT = 2, - RUNNING_TF_INIT = 3, - RUNNING_TF_PLAN = 4, - FETCHING_DEPLOYMENT = 5, - LOCKING_DEPLOYMENT = 6, - UNLOCKING_DEPLOYMENT = 7, - SUCCEEDED = 8, - FAILED = 9, - VALIDATING_REPOSITORY = 10 - } - } - - /** Properties of a PreviewArtifacts. */ - interface IPreviewArtifacts { - - /** PreviewArtifacts content */ - content?: (string|null); - - /** PreviewArtifacts artifacts */ - artifacts?: (string|null); - } - - /** Represents a PreviewArtifacts. */ - class PreviewArtifacts implements IPreviewArtifacts { - - /** - * Constructs a new PreviewArtifacts. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IPreviewArtifacts); - - /** PreviewArtifacts content. */ - public content: string; - - /** PreviewArtifacts artifacts. */ - public artifacts: string; - - /** - * Creates a new PreviewArtifacts instance using the specified properties. - * @param [properties] Properties to set - * @returns PreviewArtifacts instance - */ - public static create(properties?: google.cloud.config.v1.IPreviewArtifacts): google.cloud.config.v1.PreviewArtifacts; - - /** - * Encodes the specified PreviewArtifacts message. Does not implicitly {@link google.cloud.config.v1.PreviewArtifacts.verify|verify} messages. - * @param message PreviewArtifacts message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IPreviewArtifacts, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PreviewArtifacts message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewArtifacts.verify|verify} messages. - * @param message PreviewArtifacts message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IPreviewArtifacts, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PreviewArtifacts message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PreviewArtifacts - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.PreviewArtifacts; - - /** - * Decodes a PreviewArtifacts message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PreviewArtifacts - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.PreviewArtifacts; - - /** - * Verifies a PreviewArtifacts message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PreviewArtifacts message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PreviewArtifacts - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PreviewArtifacts; - - /** - * Creates a plain object from a PreviewArtifacts message. Also converts values to other types if specified. - * @param message PreviewArtifacts - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.PreviewArtifacts, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PreviewArtifacts to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PreviewArtifacts - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreatePreviewRequest. */ - interface ICreatePreviewRequest { - - /** CreatePreviewRequest parent */ - parent?: (string|null); - - /** CreatePreviewRequest previewId */ - previewId?: (string|null); - - /** CreatePreviewRequest preview */ - preview?: (google.cloud.config.v1.IPreview|null); - - /** CreatePreviewRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreatePreviewRequest. */ - class CreatePreviewRequest implements ICreatePreviewRequest { - - /** - * Constructs a new CreatePreviewRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.ICreatePreviewRequest); - - /** CreatePreviewRequest parent. */ - public parent: string; - - /** CreatePreviewRequest previewId. */ - public previewId: string; - - /** CreatePreviewRequest preview. */ - public preview?: (google.cloud.config.v1.IPreview|null); - - /** CreatePreviewRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreatePreviewRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreatePreviewRequest instance - */ - public static create(properties?: google.cloud.config.v1.ICreatePreviewRequest): google.cloud.config.v1.CreatePreviewRequest; - - /** - * Encodes the specified CreatePreviewRequest message. Does not implicitly {@link google.cloud.config.v1.CreatePreviewRequest.verify|verify} messages. - * @param message CreatePreviewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.ICreatePreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreatePreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.CreatePreviewRequest.verify|verify} messages. - * @param message CreatePreviewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.ICreatePreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreatePreviewRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreatePreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.CreatePreviewRequest; - - /** - * Decodes a CreatePreviewRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreatePreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.CreatePreviewRequest; - - /** - * Verifies a CreatePreviewRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreatePreviewRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreatePreviewRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.CreatePreviewRequest; - - /** - * Creates a plain object from a CreatePreviewRequest message. Also converts values to other types if specified. - * @param message CreatePreviewRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.CreatePreviewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreatePreviewRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreatePreviewRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPreviewRequest. */ - interface IGetPreviewRequest { - - /** GetPreviewRequest name */ - name?: (string|null); - } - - /** Represents a GetPreviewRequest. */ - class GetPreviewRequest implements IGetPreviewRequest { - - /** - * Constructs a new GetPreviewRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IGetPreviewRequest); - - /** GetPreviewRequest name. */ - public name: string; - - /** - * Creates a new GetPreviewRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPreviewRequest instance - */ - public static create(properties?: google.cloud.config.v1.IGetPreviewRequest): google.cloud.config.v1.GetPreviewRequest; - - /** - * Encodes the specified GetPreviewRequest message. Does not implicitly {@link google.cloud.config.v1.GetPreviewRequest.verify|verify} messages. - * @param message GetPreviewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IGetPreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetPreviewRequest.verify|verify} messages. - * @param message GetPreviewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IGetPreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPreviewRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetPreviewRequest; - - /** - * Decodes a GetPreviewRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetPreviewRequest; - - /** - * Verifies a GetPreviewRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPreviewRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPreviewRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetPreviewRequest; - - /** - * Creates a plain object from a GetPreviewRequest message. Also converts values to other types if specified. - * @param message GetPreviewRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.GetPreviewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPreviewRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPreviewRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPreviewsRequest. */ - interface IListPreviewsRequest { - - /** ListPreviewsRequest parent */ - parent?: (string|null); - - /** ListPreviewsRequest pageSize */ - pageSize?: (number|null); - - /** ListPreviewsRequest pageToken */ - pageToken?: (string|null); - - /** ListPreviewsRequest filter */ - filter?: (string|null); - - /** ListPreviewsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListPreviewsRequest. */ - class ListPreviewsRequest implements IListPreviewsRequest { - - /** - * Constructs a new ListPreviewsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListPreviewsRequest); - - /** ListPreviewsRequest parent. */ - public parent: string; - - /** ListPreviewsRequest pageSize. */ - public pageSize: number; - - /** ListPreviewsRequest pageToken. */ - public pageToken: string; - - /** ListPreviewsRequest filter. */ - public filter: string; - - /** ListPreviewsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListPreviewsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPreviewsRequest instance - */ - public static create(properties?: google.cloud.config.v1.IListPreviewsRequest): google.cloud.config.v1.ListPreviewsRequest; - - /** - * Encodes the specified ListPreviewsRequest message. Does not implicitly {@link google.cloud.config.v1.ListPreviewsRequest.verify|verify} messages. - * @param message ListPreviewsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListPreviewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPreviewsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListPreviewsRequest.verify|verify} messages. - * @param message ListPreviewsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListPreviewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPreviewsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPreviewsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListPreviewsRequest; - - /** - * Decodes a ListPreviewsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPreviewsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListPreviewsRequest; - - /** - * Verifies a ListPreviewsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPreviewsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPreviewsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListPreviewsRequest; - - /** - * Creates a plain object from a ListPreviewsRequest message. Also converts values to other types if specified. - * @param message ListPreviewsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListPreviewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPreviewsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPreviewsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPreviewsResponse. */ - interface IListPreviewsResponse { - - /** ListPreviewsResponse previews */ - previews?: (google.cloud.config.v1.IPreview[]|null); - - /** ListPreviewsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListPreviewsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListPreviewsResponse. */ - class ListPreviewsResponse implements IListPreviewsResponse { - - /** - * Constructs a new ListPreviewsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListPreviewsResponse); - - /** ListPreviewsResponse previews. */ - public previews: google.cloud.config.v1.IPreview[]; - - /** ListPreviewsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListPreviewsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListPreviewsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPreviewsResponse instance - */ - public static create(properties?: google.cloud.config.v1.IListPreviewsResponse): google.cloud.config.v1.ListPreviewsResponse; - - /** - * Encodes the specified ListPreviewsResponse message. Does not implicitly {@link google.cloud.config.v1.ListPreviewsResponse.verify|verify} messages. - * @param message ListPreviewsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListPreviewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPreviewsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListPreviewsResponse.verify|verify} messages. - * @param message ListPreviewsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListPreviewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPreviewsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPreviewsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListPreviewsResponse; - - /** - * Decodes a ListPreviewsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPreviewsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListPreviewsResponse; - - /** - * Verifies a ListPreviewsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPreviewsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPreviewsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListPreviewsResponse; - - /** - * Creates a plain object from a ListPreviewsResponse message. Also converts values to other types if specified. - * @param message ListPreviewsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListPreviewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPreviewsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPreviewsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeletePreviewRequest. */ - interface IDeletePreviewRequest { - - /** DeletePreviewRequest name */ - name?: (string|null); - - /** DeletePreviewRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeletePreviewRequest. */ - class DeletePreviewRequest implements IDeletePreviewRequest { - - /** - * Constructs a new DeletePreviewRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IDeletePreviewRequest); - - /** DeletePreviewRequest name. */ - public name: string; - - /** DeletePreviewRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeletePreviewRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeletePreviewRequest instance - */ - public static create(properties?: google.cloud.config.v1.IDeletePreviewRequest): google.cloud.config.v1.DeletePreviewRequest; - - /** - * Encodes the specified DeletePreviewRequest message. Does not implicitly {@link google.cloud.config.v1.DeletePreviewRequest.verify|verify} messages. - * @param message DeletePreviewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IDeletePreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeletePreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeletePreviewRequest.verify|verify} messages. - * @param message DeletePreviewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IDeletePreviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeletePreviewRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeletePreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.DeletePreviewRequest; - - /** - * Decodes a DeletePreviewRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeletePreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.DeletePreviewRequest; - - /** - * Verifies a DeletePreviewRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeletePreviewRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeletePreviewRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.DeletePreviewRequest; - - /** - * Creates a plain object from a DeletePreviewRequest message. Also converts values to other types if specified. - * @param message DeletePreviewRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.DeletePreviewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeletePreviewRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeletePreviewRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportPreviewResultRequest. */ - interface IExportPreviewResultRequest { - - /** ExportPreviewResultRequest parent */ - parent?: (string|null); - } - - /** Represents an ExportPreviewResultRequest. */ - class ExportPreviewResultRequest implements IExportPreviewResultRequest { - - /** - * Constructs a new ExportPreviewResultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IExportPreviewResultRequest); - - /** ExportPreviewResultRequest parent. */ - public parent: string; - - /** - * Creates a new ExportPreviewResultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportPreviewResultRequest instance - */ - public static create(properties?: google.cloud.config.v1.IExportPreviewResultRequest): google.cloud.config.v1.ExportPreviewResultRequest; - - /** - * Encodes the specified ExportPreviewResultRequest message. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultRequest.verify|verify} messages. - * @param message ExportPreviewResultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IExportPreviewResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportPreviewResultRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultRequest.verify|verify} messages. - * @param message ExportPreviewResultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IExportPreviewResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportPreviewResultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportPreviewResultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ExportPreviewResultRequest; - - /** - * Decodes an ExportPreviewResultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportPreviewResultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ExportPreviewResultRequest; - - /** - * Verifies an ExportPreviewResultRequest message. - * @param message Plain 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 ExportPreviewResultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportPreviewResultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ExportPreviewResultRequest; - - /** - * Creates a plain object from an ExportPreviewResultRequest message. Also converts values to other types if specified. - * @param message ExportPreviewResultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ExportPreviewResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportPreviewResultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportPreviewResultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportPreviewResultResponse. */ - interface IExportPreviewResultResponse { - - /** ExportPreviewResultResponse result */ - result?: (google.cloud.config.v1.IPreviewResult|null); - } - - /** Represents an ExportPreviewResultResponse. */ - class ExportPreviewResultResponse implements IExportPreviewResultResponse { - - /** - * Constructs a new ExportPreviewResultResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IExportPreviewResultResponse); - - /** ExportPreviewResultResponse result. */ - public result?: (google.cloud.config.v1.IPreviewResult|null); - - /** - * Creates a new ExportPreviewResultResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportPreviewResultResponse instance - */ - public static create(properties?: google.cloud.config.v1.IExportPreviewResultResponse): google.cloud.config.v1.ExportPreviewResultResponse; - - /** - * Encodes the specified ExportPreviewResultResponse message. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultResponse.verify|verify} messages. - * @param message ExportPreviewResultResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IExportPreviewResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportPreviewResultResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultResponse.verify|verify} messages. - * @param message ExportPreviewResultResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IExportPreviewResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportPreviewResultResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportPreviewResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ExportPreviewResultResponse; - - /** - * Decodes an ExportPreviewResultResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportPreviewResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ExportPreviewResultResponse; - - /** - * Verifies an ExportPreviewResultResponse message. - * @param message Plain 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 ExportPreviewResultResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportPreviewResultResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ExportPreviewResultResponse; - - /** - * Creates a plain object from an ExportPreviewResultResponse message. Also converts values to other types if specified. - * @param message ExportPreviewResultResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ExportPreviewResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportPreviewResultResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportPreviewResultResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PreviewResult. */ - interface IPreviewResult { - - /** PreviewResult binarySignedUri */ - binarySignedUri?: (string|null); - - /** PreviewResult jsonSignedUri */ - jsonSignedUri?: (string|null); - } - - /** Represents a PreviewResult. */ - class PreviewResult implements IPreviewResult { - - /** - * Constructs a new PreviewResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IPreviewResult); - - /** PreviewResult binarySignedUri. */ - public binarySignedUri: string; - - /** PreviewResult jsonSignedUri. */ - public jsonSignedUri: string; - - /** - * Creates a new PreviewResult instance using the specified properties. - * @param [properties] Properties to set - * @returns PreviewResult instance - */ - public static create(properties?: google.cloud.config.v1.IPreviewResult): google.cloud.config.v1.PreviewResult; - - /** - * Encodes the specified PreviewResult message. Does not implicitly {@link google.cloud.config.v1.PreviewResult.verify|verify} messages. - * @param message PreviewResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IPreviewResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PreviewResult message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewResult.verify|verify} messages. - * @param message PreviewResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IPreviewResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PreviewResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PreviewResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.PreviewResult; - - /** - * Decodes a PreviewResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PreviewResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.PreviewResult; - - /** - * Verifies a PreviewResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PreviewResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PreviewResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PreviewResult; - - /** - * Creates a plain object from a PreviewResult message. Also converts values to other types if specified. - * @param message PreviewResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.PreviewResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PreviewResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PreviewResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetTerraformVersionRequest. */ - interface IGetTerraformVersionRequest { - - /** GetTerraformVersionRequest name */ - name?: (string|null); - } - - /** Represents a GetTerraformVersionRequest. */ - class GetTerraformVersionRequest implements IGetTerraformVersionRequest { - - /** - * Constructs a new GetTerraformVersionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IGetTerraformVersionRequest); - - /** GetTerraformVersionRequest name. */ - public name: string; - - /** - * Creates a new GetTerraformVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTerraformVersionRequest instance - */ - public static create(properties?: google.cloud.config.v1.IGetTerraformVersionRequest): google.cloud.config.v1.GetTerraformVersionRequest; - - /** - * Encodes the specified GetTerraformVersionRequest message. Does not implicitly {@link google.cloud.config.v1.GetTerraformVersionRequest.verify|verify} messages. - * @param message GetTerraformVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IGetTerraformVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTerraformVersionRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetTerraformVersionRequest.verify|verify} messages. - * @param message GetTerraformVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IGetTerraformVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTerraformVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTerraformVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetTerraformVersionRequest; - - /** - * Decodes a GetTerraformVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTerraformVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetTerraformVersionRequest; - - /** - * Verifies a GetTerraformVersionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTerraformVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTerraformVersionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetTerraformVersionRequest; - - /** - * Creates a plain object from a GetTerraformVersionRequest message. Also converts values to other types if specified. - * @param message GetTerraformVersionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.GetTerraformVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTerraformVersionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetTerraformVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTerraformVersionsRequest. */ - interface IListTerraformVersionsRequest { - - /** ListTerraformVersionsRequest parent */ - parent?: (string|null); - - /** ListTerraformVersionsRequest pageSize */ - pageSize?: (number|null); - - /** ListTerraformVersionsRequest pageToken */ - pageToken?: (string|null); - - /** ListTerraformVersionsRequest filter */ - filter?: (string|null); - - /** ListTerraformVersionsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListTerraformVersionsRequest. */ - class ListTerraformVersionsRequest implements IListTerraformVersionsRequest { - - /** - * Constructs a new ListTerraformVersionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListTerraformVersionsRequest); - - /** ListTerraformVersionsRequest parent. */ - public parent: string; - - /** ListTerraformVersionsRequest pageSize. */ - public pageSize: number; - - /** ListTerraformVersionsRequest pageToken. */ - public pageToken: string; - - /** ListTerraformVersionsRequest filter. */ - public filter: string; - - /** ListTerraformVersionsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListTerraformVersionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTerraformVersionsRequest instance - */ - public static create(properties?: google.cloud.config.v1.IListTerraformVersionsRequest): google.cloud.config.v1.ListTerraformVersionsRequest; - - /** - * Encodes the specified ListTerraformVersionsRequest message. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsRequest.verify|verify} messages. - * @param message ListTerraformVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListTerraformVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTerraformVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsRequest.verify|verify} messages. - * @param message ListTerraformVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListTerraformVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTerraformVersionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTerraformVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListTerraformVersionsRequest; - - /** - * Decodes a ListTerraformVersionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTerraformVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListTerraformVersionsRequest; - - /** - * Verifies a ListTerraformVersionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTerraformVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTerraformVersionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListTerraformVersionsRequest; - - /** - * Creates a plain object from a ListTerraformVersionsRequest message. Also converts values to other types if specified. - * @param message ListTerraformVersionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListTerraformVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTerraformVersionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTerraformVersionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTerraformVersionsResponse. */ - interface IListTerraformVersionsResponse { - - /** ListTerraformVersionsResponse terraformVersions */ - terraformVersions?: (google.cloud.config.v1.ITerraformVersion[]|null); - - /** ListTerraformVersionsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListTerraformVersionsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListTerraformVersionsResponse. */ - class ListTerraformVersionsResponse implements IListTerraformVersionsResponse { - - /** - * Constructs a new ListTerraformVersionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListTerraformVersionsResponse); - - /** ListTerraformVersionsResponse terraformVersions. */ - public terraformVersions: google.cloud.config.v1.ITerraformVersion[]; - - /** ListTerraformVersionsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListTerraformVersionsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListTerraformVersionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTerraformVersionsResponse instance - */ - public static create(properties?: google.cloud.config.v1.IListTerraformVersionsResponse): google.cloud.config.v1.ListTerraformVersionsResponse; - - /** - * Encodes the specified ListTerraformVersionsResponse message. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsResponse.verify|verify} messages. - * @param message ListTerraformVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListTerraformVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTerraformVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsResponse.verify|verify} messages. - * @param message ListTerraformVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListTerraformVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTerraformVersionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTerraformVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListTerraformVersionsResponse; - - /** - * Decodes a ListTerraformVersionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTerraformVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListTerraformVersionsResponse; - - /** - * Verifies a ListTerraformVersionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTerraformVersionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTerraformVersionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListTerraformVersionsResponse; - - /** - * Creates a plain object from a ListTerraformVersionsResponse message. Also converts values to other types if specified. - * @param message ListTerraformVersionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListTerraformVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTerraformVersionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTerraformVersionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TerraformVersion. */ - interface ITerraformVersion { - - /** TerraformVersion name */ - name?: (string|null); - - /** TerraformVersion state */ - state?: (google.cloud.config.v1.TerraformVersion.State|keyof typeof google.cloud.config.v1.TerraformVersion.State|null); - - /** TerraformVersion supportTime */ - supportTime?: (google.protobuf.ITimestamp|null); - - /** TerraformVersion deprecateTime */ - deprecateTime?: (google.protobuf.ITimestamp|null); - - /** TerraformVersion obsoleteTime */ - obsoleteTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a TerraformVersion. */ - class TerraformVersion implements ITerraformVersion { - - /** - * Constructs a new TerraformVersion. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.ITerraformVersion); - - /** TerraformVersion name. */ - public name: string; - - /** TerraformVersion state. */ - public state: (google.cloud.config.v1.TerraformVersion.State|keyof typeof google.cloud.config.v1.TerraformVersion.State); - - /** TerraformVersion supportTime. */ - public supportTime?: (google.protobuf.ITimestamp|null); - - /** TerraformVersion deprecateTime. */ - public deprecateTime?: (google.protobuf.ITimestamp|null); - - /** TerraformVersion obsoleteTime. */ - public obsoleteTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new TerraformVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns TerraformVersion instance - */ - public static create(properties?: google.cloud.config.v1.ITerraformVersion): google.cloud.config.v1.TerraformVersion; - - /** - * Encodes the specified TerraformVersion message. Does not implicitly {@link google.cloud.config.v1.TerraformVersion.verify|verify} messages. - * @param message TerraformVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.ITerraformVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TerraformVersion message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformVersion.verify|verify} messages. - * @param message TerraformVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.ITerraformVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TerraformVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TerraformVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.TerraformVersion; - - /** - * Decodes a TerraformVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TerraformVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.TerraformVersion; - - /** - * Verifies a TerraformVersion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TerraformVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TerraformVersion - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.TerraformVersion; - - /** - * Creates a plain object from a TerraformVersion message. Also converts values to other types if specified. - * @param message TerraformVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.TerraformVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TerraformVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TerraformVersion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace TerraformVersion { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - DEPRECATED = 2, - OBSOLETE = 3 - } - } - - /** Properties of a ResourceChangeTerraformInfo. */ - interface IResourceChangeTerraformInfo { - - /** ResourceChangeTerraformInfo address */ - address?: (string|null); - - /** ResourceChangeTerraformInfo type */ - type?: (string|null); - - /** ResourceChangeTerraformInfo resourceName */ - resourceName?: (string|null); - - /** ResourceChangeTerraformInfo provider */ - provider?: (string|null); - - /** ResourceChangeTerraformInfo actions */ - actions?: (string[]|null); - } - - /** Represents a ResourceChangeTerraformInfo. */ - class ResourceChangeTerraformInfo implements IResourceChangeTerraformInfo { - - /** - * Constructs a new ResourceChangeTerraformInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IResourceChangeTerraformInfo); - - /** ResourceChangeTerraformInfo address. */ - public address: string; - - /** ResourceChangeTerraformInfo type. */ - public type: string; - - /** ResourceChangeTerraformInfo resourceName. */ - public resourceName: string; - - /** ResourceChangeTerraformInfo provider. */ - public provider: string; - - /** ResourceChangeTerraformInfo actions. */ - public actions: string[]; - - /** - * Creates a new ResourceChangeTerraformInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceChangeTerraformInfo instance - */ - public static create(properties?: google.cloud.config.v1.IResourceChangeTerraformInfo): google.cloud.config.v1.ResourceChangeTerraformInfo; - - /** - * Encodes the specified ResourceChangeTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. - * @param message ResourceChangeTerraformInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IResourceChangeTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceChangeTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. - * @param message ResourceChangeTerraformInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IResourceChangeTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceChangeTerraformInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceChangeTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceChangeTerraformInfo; - - /** - * Decodes a ResourceChangeTerraformInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceChangeTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceChangeTerraformInfo; - - /** - * Verifies a ResourceChangeTerraformInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceChangeTerraformInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceChangeTerraformInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceChangeTerraformInfo; - - /** - * Creates a plain object from a ResourceChangeTerraformInfo message. Also converts values to other types if specified. - * @param message ResourceChangeTerraformInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ResourceChangeTerraformInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceChangeTerraformInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceChangeTerraformInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceChange. */ - interface IResourceChange { - - /** ResourceChange name */ - name?: (string|null); - - /** ResourceChange terraformInfo */ - terraformInfo?: (google.cloud.config.v1.IResourceChangeTerraformInfo|null); - - /** ResourceChange intent */ - intent?: (google.cloud.config.v1.ResourceChange.Intent|keyof typeof google.cloud.config.v1.ResourceChange.Intent|null); - - /** ResourceChange propertyChanges */ - propertyChanges?: (google.cloud.config.v1.IPropertyChange[]|null); - } - - /** Represents a ResourceChange. */ - class ResourceChange implements IResourceChange { - - /** - * Constructs a new ResourceChange. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IResourceChange); - - /** ResourceChange name. */ - public name: string; - - /** ResourceChange terraformInfo. */ - public terraformInfo?: (google.cloud.config.v1.IResourceChangeTerraformInfo|null); - - /** ResourceChange intent. */ - public intent: (google.cloud.config.v1.ResourceChange.Intent|keyof typeof google.cloud.config.v1.ResourceChange.Intent); - - /** ResourceChange propertyChanges. */ - public propertyChanges: google.cloud.config.v1.IPropertyChange[]; - - /** - * Creates a new ResourceChange instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceChange instance - */ - public static create(properties?: google.cloud.config.v1.IResourceChange): google.cloud.config.v1.ResourceChange; - - /** - * Encodes the specified ResourceChange message. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. - * @param message ResourceChange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IResourceChange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. - * @param message ResourceChange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IResourceChange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceChange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceChange; - - /** - * Decodes a ResourceChange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceChange; - - /** - * Verifies a ResourceChange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceChange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceChange - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceChange; - - /** - * Creates a plain object from a ResourceChange message. Also converts values to other types if specified. - * @param message ResourceChange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ResourceChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceChange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceChange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceChange { - - /** Intent enum. */ - enum Intent { - INTENT_UNSPECIFIED = 0, - CREATE = 1, - UPDATE = 2, - DELETE = 3, - RECREATE = 4, - UNCHANGED = 5 - } - } - - /** Properties of a PropertyChange. */ - interface IPropertyChange { - - /** PropertyChange path */ - path?: (string|null); - - /** PropertyChange beforeSensitivePaths */ - beforeSensitivePaths?: (string[]|null); - - /** PropertyChange before */ - before?: (google.protobuf.IValue|null); - - /** PropertyChange afterSensitivePaths */ - afterSensitivePaths?: (string[]|null); - - /** PropertyChange after */ - after?: (google.protobuf.IValue|null); - } - - /** Represents a PropertyChange. */ - class PropertyChange implements IPropertyChange { - - /** - * Constructs a new PropertyChange. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IPropertyChange); - - /** PropertyChange path. */ - public path: string; - - /** PropertyChange beforeSensitivePaths. */ - public beforeSensitivePaths: string[]; - - /** PropertyChange before. */ - public before?: (google.protobuf.IValue|null); - - /** PropertyChange afterSensitivePaths. */ - public afterSensitivePaths: string[]; - - /** PropertyChange after. */ - public after?: (google.protobuf.IValue|null); - - /** - * Creates a new PropertyChange instance using the specified properties. - * @param [properties] Properties to set - * @returns PropertyChange instance - */ - public static create(properties?: google.cloud.config.v1.IPropertyChange): google.cloud.config.v1.PropertyChange; - - /** - * Encodes the specified PropertyChange message. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. - * @param message PropertyChange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IPropertyChange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PropertyChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. - * @param message PropertyChange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IPropertyChange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PropertyChange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PropertyChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.PropertyChange; - - /** - * Decodes a PropertyChange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PropertyChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.PropertyChange; - - /** - * Verifies a PropertyChange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PropertyChange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PropertyChange - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PropertyChange; - - /** - * Creates a plain object from a PropertyChange message. Also converts values to other types if specified. - * @param message PropertyChange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.PropertyChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PropertyChange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PropertyChange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListResourceChangesRequest. */ - interface IListResourceChangesRequest { - - /** ListResourceChangesRequest parent */ - parent?: (string|null); - - /** ListResourceChangesRequest pageSize */ - pageSize?: (number|null); - - /** ListResourceChangesRequest pageToken */ - pageToken?: (string|null); - - /** ListResourceChangesRequest filter */ - filter?: (string|null); - - /** ListResourceChangesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListResourceChangesRequest. */ - class ListResourceChangesRequest implements IListResourceChangesRequest { - - /** - * Constructs a new ListResourceChangesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListResourceChangesRequest); - - /** ListResourceChangesRequest parent. */ - public parent: string; - - /** ListResourceChangesRequest pageSize. */ - public pageSize: number; - - /** ListResourceChangesRequest pageToken. */ - public pageToken: string; - - /** ListResourceChangesRequest filter. */ - public filter: string; - - /** ListResourceChangesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListResourceChangesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListResourceChangesRequest instance - */ - public static create(properties?: google.cloud.config.v1.IListResourceChangesRequest): google.cloud.config.v1.ListResourceChangesRequest; - - /** - * Encodes the specified ListResourceChangesRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. - * @param message ListResourceChangesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListResourceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListResourceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. - * @param message ListResourceChangesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListResourceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListResourceChangesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListResourceChangesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourceChangesRequest; - - /** - * Decodes a ListResourceChangesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListResourceChangesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourceChangesRequest; - - /** - * Verifies a ListResourceChangesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListResourceChangesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListResourceChangesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceChangesRequest; - - /** - * Creates a plain object from a ListResourceChangesRequest message. Also converts values to other types if specified. - * @param message ListResourceChangesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListResourceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListResourceChangesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListResourceChangesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListResourceChangesResponse. */ - interface IListResourceChangesResponse { - - /** ListResourceChangesResponse resourceChanges */ - resourceChanges?: (google.cloud.config.v1.IResourceChange[]|null); - - /** ListResourceChangesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListResourceChangesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListResourceChangesResponse. */ - class ListResourceChangesResponse implements IListResourceChangesResponse { - - /** - * Constructs a new ListResourceChangesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListResourceChangesResponse); - - /** ListResourceChangesResponse resourceChanges. */ - public resourceChanges: google.cloud.config.v1.IResourceChange[]; - - /** ListResourceChangesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListResourceChangesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListResourceChangesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListResourceChangesResponse instance - */ - public static create(properties?: google.cloud.config.v1.IListResourceChangesResponse): google.cloud.config.v1.ListResourceChangesResponse; - - /** - * Encodes the specified ListResourceChangesResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. - * @param message ListResourceChangesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListResourceChangesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListResourceChangesResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. - * @param message ListResourceChangesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListResourceChangesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListResourceChangesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListResourceChangesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourceChangesResponse; - - /** - * Decodes a ListResourceChangesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListResourceChangesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourceChangesResponse; - - /** - * Verifies a ListResourceChangesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListResourceChangesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListResourceChangesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceChangesResponse; - - /** - * Creates a plain object from a ListResourceChangesResponse message. Also converts values to other types if specified. - * @param message ListResourceChangesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListResourceChangesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListResourceChangesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListResourceChangesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetResourceChangeRequest. */ - interface IGetResourceChangeRequest { - - /** GetResourceChangeRequest name */ - name?: (string|null); - } - - /** Represents a GetResourceChangeRequest. */ - class GetResourceChangeRequest implements IGetResourceChangeRequest { - - /** - * Constructs a new GetResourceChangeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IGetResourceChangeRequest); - - /** GetResourceChangeRequest name. */ - public name: string; - - /** - * Creates a new GetResourceChangeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetResourceChangeRequest instance - */ - public static create(properties?: google.cloud.config.v1.IGetResourceChangeRequest): google.cloud.config.v1.GetResourceChangeRequest; - - /** - * Encodes the specified GetResourceChangeRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. - * @param message GetResourceChangeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IGetResourceChangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetResourceChangeRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. - * @param message GetResourceChangeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IGetResourceChangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetResourceChangeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetResourceChangeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetResourceChangeRequest; - - /** - * Decodes a GetResourceChangeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetResourceChangeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetResourceChangeRequest; - - /** - * Verifies a GetResourceChangeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetResourceChangeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetResourceChangeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetResourceChangeRequest; - - /** - * Creates a plain object from a GetResourceChangeRequest message. Also converts values to other types if specified. - * @param message GetResourceChangeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.GetResourceChangeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetResourceChangeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetResourceChangeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceDriftTerraformInfo. */ - interface IResourceDriftTerraformInfo { - - /** ResourceDriftTerraformInfo address */ - address?: (string|null); - - /** ResourceDriftTerraformInfo type */ - type?: (string|null); - - /** ResourceDriftTerraformInfo resourceName */ - resourceName?: (string|null); - - /** ResourceDriftTerraformInfo provider */ - provider?: (string|null); - } - - /** Represents a ResourceDriftTerraformInfo. */ - class ResourceDriftTerraformInfo implements IResourceDriftTerraformInfo { - - /** - * Constructs a new ResourceDriftTerraformInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IResourceDriftTerraformInfo); - - /** ResourceDriftTerraformInfo address. */ - public address: string; - - /** ResourceDriftTerraformInfo type. */ - public type: string; - - /** ResourceDriftTerraformInfo resourceName. */ - public resourceName: string; - - /** ResourceDriftTerraformInfo provider. */ - public provider: string; - - /** - * Creates a new ResourceDriftTerraformInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDriftTerraformInfo instance - */ - public static create(properties?: google.cloud.config.v1.IResourceDriftTerraformInfo): google.cloud.config.v1.ResourceDriftTerraformInfo; - - /** - * Encodes the specified ResourceDriftTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. - * @param message ResourceDriftTerraformInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IResourceDriftTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDriftTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. - * @param message ResourceDriftTerraformInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IResourceDriftTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDriftTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceDriftTerraformInfo; - - /** - * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDriftTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceDriftTerraformInfo; - - /** - * Verifies a ResourceDriftTerraformInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDriftTerraformInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDriftTerraformInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceDriftTerraformInfo; - - /** - * Creates a plain object from a ResourceDriftTerraformInfo message. Also converts values to other types if specified. - * @param message ResourceDriftTerraformInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ResourceDriftTerraformInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDriftTerraformInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDriftTerraformInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceDrift. */ - interface IResourceDrift { - - /** ResourceDrift name */ - name?: (string|null); - - /** ResourceDrift terraformInfo */ - terraformInfo?: (google.cloud.config.v1.IResourceDriftTerraformInfo|null); - - /** ResourceDrift propertyDrifts */ - propertyDrifts?: (google.cloud.config.v1.IPropertyDrift[]|null); - } - - /** Represents a ResourceDrift. */ - class ResourceDrift implements IResourceDrift { - - /** - * Constructs a new ResourceDrift. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IResourceDrift); - - /** ResourceDrift name. */ - public name: string; - - /** ResourceDrift terraformInfo. */ - public terraformInfo?: (google.cloud.config.v1.IResourceDriftTerraformInfo|null); - - /** ResourceDrift propertyDrifts. */ - public propertyDrifts: google.cloud.config.v1.IPropertyDrift[]; - - /** - * Creates a new ResourceDrift instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDrift instance - */ - public static create(properties?: google.cloud.config.v1.IResourceDrift): google.cloud.config.v1.ResourceDrift; - - /** - * Encodes the specified ResourceDrift message. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. - * @param message ResourceDrift message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IResourceDrift, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. - * @param message ResourceDrift message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IResourceDrift, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDrift message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDrift - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ResourceDrift; - - /** - * Decodes a ResourceDrift message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDrift - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ResourceDrift; - - /** - * Verifies a ResourceDrift message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDrift message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDrift - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceDrift; - - /** - * Creates a plain object from a ResourceDrift message. Also converts values to other types if specified. - * @param message ResourceDrift - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ResourceDrift, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDrift to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDrift - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PropertyDrift. */ - interface IPropertyDrift { - - /** PropertyDrift path */ - path?: (string|null); - - /** PropertyDrift beforeSensitivePaths */ - beforeSensitivePaths?: (string[]|null); - - /** PropertyDrift before */ - before?: (google.protobuf.IValue|null); - - /** PropertyDrift afterSensitivePaths */ - afterSensitivePaths?: (string[]|null); - - /** PropertyDrift after */ - after?: (google.protobuf.IValue|null); - } - - /** Represents a PropertyDrift. */ - class PropertyDrift implements IPropertyDrift { - - /** - * Constructs a new PropertyDrift. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IPropertyDrift); - - /** PropertyDrift path. */ - public path: string; - - /** PropertyDrift beforeSensitivePaths. */ - public beforeSensitivePaths: string[]; - - /** PropertyDrift before. */ - public before?: (google.protobuf.IValue|null); - - /** PropertyDrift afterSensitivePaths. */ - public afterSensitivePaths: string[]; - - /** PropertyDrift after. */ - public after?: (google.protobuf.IValue|null); - - /** - * Creates a new PropertyDrift instance using the specified properties. - * @param [properties] Properties to set - * @returns PropertyDrift instance - */ - public static create(properties?: google.cloud.config.v1.IPropertyDrift): google.cloud.config.v1.PropertyDrift; - - /** - * Encodes the specified PropertyDrift message. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. - * @param message PropertyDrift message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IPropertyDrift, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PropertyDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. - * @param message PropertyDrift message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IPropertyDrift, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PropertyDrift message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PropertyDrift - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.PropertyDrift; - - /** - * Decodes a PropertyDrift message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PropertyDrift - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.PropertyDrift; - - /** - * Verifies a PropertyDrift message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PropertyDrift message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PropertyDrift - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PropertyDrift; - - /** - * Creates a plain object from a PropertyDrift message. Also converts values to other types if specified. - * @param message PropertyDrift - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.PropertyDrift, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PropertyDrift to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PropertyDrift - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListResourceDriftsRequest. */ - interface IListResourceDriftsRequest { - - /** ListResourceDriftsRequest parent */ - parent?: (string|null); - - /** ListResourceDriftsRequest pageSize */ - pageSize?: (number|null); - - /** ListResourceDriftsRequest pageToken */ - pageToken?: (string|null); - - /** ListResourceDriftsRequest filter */ - filter?: (string|null); - - /** ListResourceDriftsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListResourceDriftsRequest. */ - class ListResourceDriftsRequest implements IListResourceDriftsRequest { - - /** - * Constructs a new ListResourceDriftsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListResourceDriftsRequest); - - /** ListResourceDriftsRequest parent. */ - public parent: string; - - /** ListResourceDriftsRequest pageSize. */ - public pageSize: number; - - /** ListResourceDriftsRequest pageToken. */ - public pageToken: string; - - /** ListResourceDriftsRequest filter. */ - public filter: string; - - /** ListResourceDriftsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListResourceDriftsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListResourceDriftsRequest instance - */ - public static create(properties?: google.cloud.config.v1.IListResourceDriftsRequest): google.cloud.config.v1.ListResourceDriftsRequest; - - /** - * Encodes the specified ListResourceDriftsRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. - * @param message ListResourceDriftsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListResourceDriftsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListResourceDriftsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. - * @param message ListResourceDriftsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListResourceDriftsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListResourceDriftsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListResourceDriftsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourceDriftsRequest; - - /** - * Decodes a ListResourceDriftsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListResourceDriftsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourceDriftsRequest; - - /** - * Verifies a ListResourceDriftsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListResourceDriftsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListResourceDriftsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceDriftsRequest; - - /** - * Creates a plain object from a ListResourceDriftsRequest message. Also converts values to other types if specified. - * @param message ListResourceDriftsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListResourceDriftsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListResourceDriftsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListResourceDriftsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListResourceDriftsResponse. */ - interface IListResourceDriftsResponse { - - /** ListResourceDriftsResponse resourceDrifts */ - resourceDrifts?: (google.cloud.config.v1.IResourceDrift[]|null); - - /** ListResourceDriftsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListResourceDriftsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListResourceDriftsResponse. */ - class ListResourceDriftsResponse implements IListResourceDriftsResponse { - - /** - * Constructs a new ListResourceDriftsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IListResourceDriftsResponse); - - /** ListResourceDriftsResponse resourceDrifts. */ - public resourceDrifts: google.cloud.config.v1.IResourceDrift[]; - - /** ListResourceDriftsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListResourceDriftsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListResourceDriftsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListResourceDriftsResponse instance - */ - public static create(properties?: google.cloud.config.v1.IListResourceDriftsResponse): google.cloud.config.v1.ListResourceDriftsResponse; - - /** - * Encodes the specified ListResourceDriftsResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. - * @param message ListResourceDriftsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IListResourceDriftsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListResourceDriftsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. - * @param message ListResourceDriftsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IListResourceDriftsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListResourceDriftsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListResourceDriftsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ListResourceDriftsResponse; - - /** - * Decodes a ListResourceDriftsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListResourceDriftsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ListResourceDriftsResponse; - - /** - * Verifies a ListResourceDriftsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListResourceDriftsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListResourceDriftsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceDriftsResponse; - - /** - * Creates a plain object from a ListResourceDriftsResponse message. Also converts values to other types if specified. - * @param message ListResourceDriftsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ListResourceDriftsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListResourceDriftsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListResourceDriftsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetResourceDriftRequest. */ - interface IGetResourceDriftRequest { - - /** GetResourceDriftRequest name */ - name?: (string|null); - } - - /** Represents a GetResourceDriftRequest. */ - class GetResourceDriftRequest implements IGetResourceDriftRequest { - - /** - * Constructs a new GetResourceDriftRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IGetResourceDriftRequest); - - /** GetResourceDriftRequest name. */ - public name: string; - - /** - * Creates a new GetResourceDriftRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetResourceDriftRequest instance - */ - public static create(properties?: google.cloud.config.v1.IGetResourceDriftRequest): google.cloud.config.v1.GetResourceDriftRequest; - - /** - * Encodes the specified GetResourceDriftRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. - * @param message GetResourceDriftRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IGetResourceDriftRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetResourceDriftRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. - * @param message GetResourceDriftRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IGetResourceDriftRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetResourceDriftRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetResourceDriftRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetResourceDriftRequest; - - /** - * Decodes a GetResourceDriftRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetResourceDriftRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetResourceDriftRequest; - - /** - * Verifies a GetResourceDriftRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetResourceDriftRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetResourceDriftRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetResourceDriftRequest; - - /** - * Creates a plain object from a GetResourceDriftRequest message. Also converts values to other types if specified. - * @param message GetResourceDriftRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.GetResourceDriftRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetResourceDriftRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetResourceDriftRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ProviderConfig. */ - interface IProviderConfig { - - /** ProviderConfig sourceType */ - sourceType?: (google.cloud.config.v1.ProviderConfig.ProviderSource|keyof typeof google.cloud.config.v1.ProviderConfig.ProviderSource|null); - } - - /** Represents a ProviderConfig. */ - class ProviderConfig implements IProviderConfig { - - /** - * Constructs a new ProviderConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IProviderConfig); - - /** ProviderConfig sourceType. */ - public sourceType?: (google.cloud.config.v1.ProviderConfig.ProviderSource|keyof typeof google.cloud.config.v1.ProviderConfig.ProviderSource|null); - - /** - * Creates a new ProviderConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ProviderConfig instance - */ - public static create(properties?: google.cloud.config.v1.IProviderConfig): google.cloud.config.v1.ProviderConfig; - - /** - * Encodes the specified ProviderConfig message. Does not implicitly {@link google.cloud.config.v1.ProviderConfig.verify|verify} messages. - * @param message ProviderConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IProviderConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProviderConfig message, length delimited. Does not implicitly {@link google.cloud.config.v1.ProviderConfig.verify|verify} messages. - * @param message ProviderConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IProviderConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProviderConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProviderConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.ProviderConfig; - - /** - * Decodes a ProviderConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProviderConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.ProviderConfig; - - /** - * Verifies a ProviderConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProviderConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProviderConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ProviderConfig; - - /** - * Creates a plain object from a ProviderConfig message. Also converts values to other types if specified. - * @param message ProviderConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.ProviderConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProviderConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProviderConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ProviderConfig { - - /** ProviderSource enum. */ - enum ProviderSource { - PROVIDER_SOURCE_UNSPECIFIED = 0, - SERVICE_MAINTAINED = 1 - } - } - - /** Properties of a GetAutoMigrationConfigRequest. */ - interface IGetAutoMigrationConfigRequest { - - /** GetAutoMigrationConfigRequest name */ - name?: (string|null); - } - - /** Represents a GetAutoMigrationConfigRequest. */ - class GetAutoMigrationConfigRequest implements IGetAutoMigrationConfigRequest { - - /** - * Constructs a new GetAutoMigrationConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IGetAutoMigrationConfigRequest); - - /** GetAutoMigrationConfigRequest name. */ - public name: string; - - /** - * Creates a new GetAutoMigrationConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAutoMigrationConfigRequest instance - */ - public static create(properties?: google.cloud.config.v1.IGetAutoMigrationConfigRequest): google.cloud.config.v1.GetAutoMigrationConfigRequest; - - /** - * Encodes the specified GetAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. - * @param message GetAutoMigrationConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IGetAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. - * @param message GetAutoMigrationConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IGetAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAutoMigrationConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetAutoMigrationConfigRequest; - - /** - * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAutoMigrationConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetAutoMigrationConfigRequest; - - /** - * Verifies a GetAutoMigrationConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAutoMigrationConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetAutoMigrationConfigRequest; - - /** - * Creates a plain object from a GetAutoMigrationConfigRequest message. Also converts values to other types if specified. - * @param message GetAutoMigrationConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.GetAutoMigrationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetAutoMigrationConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetAutoMigrationConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AutoMigrationConfig. */ - interface IAutoMigrationConfig { - - /** AutoMigrationConfig name */ - name?: (string|null); - - /** AutoMigrationConfig updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** AutoMigrationConfig autoMigrationEnabled */ - autoMigrationEnabled?: (boolean|null); - } - - /** Represents an AutoMigrationConfig. */ - class AutoMigrationConfig implements IAutoMigrationConfig { - - /** - * Constructs a new AutoMigrationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IAutoMigrationConfig); - - /** AutoMigrationConfig name. */ - public name: string; - - /** AutoMigrationConfig updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** AutoMigrationConfig autoMigrationEnabled. */ - public autoMigrationEnabled: boolean; - - /** - * Creates a new AutoMigrationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AutoMigrationConfig instance - */ - public static create(properties?: google.cloud.config.v1.IAutoMigrationConfig): google.cloud.config.v1.AutoMigrationConfig; - - /** - * Encodes the specified AutoMigrationConfig message. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. - * @param message AutoMigrationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IAutoMigrationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutoMigrationConfig message, length delimited. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. - * @param message AutoMigrationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IAutoMigrationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutoMigrationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutoMigrationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.AutoMigrationConfig; - - /** - * Decodes an AutoMigrationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutoMigrationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.AutoMigrationConfig; - - /** - * Verifies an AutoMigrationConfig message. - * @param message Plain 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 AutoMigrationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutoMigrationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.AutoMigrationConfig; - - /** - * Creates a plain object from an AutoMigrationConfig message. Also converts values to other types if specified. - * @param message AutoMigrationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.AutoMigrationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutoMigrationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutoMigrationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateAutoMigrationConfigRequest. */ - interface IUpdateAutoMigrationConfigRequest { - - /** UpdateAutoMigrationConfigRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateAutoMigrationConfigRequest autoMigrationConfig */ - autoMigrationConfig?: (google.cloud.config.v1.IAutoMigrationConfig|null); - } - - /** Represents an UpdateAutoMigrationConfigRequest. */ - class UpdateAutoMigrationConfigRequest implements IUpdateAutoMigrationConfigRequest { - - /** - * Constructs a new UpdateAutoMigrationConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest); - - /** UpdateAutoMigrationConfigRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateAutoMigrationConfigRequest autoMigrationConfig. */ - public autoMigrationConfig?: (google.cloud.config.v1.IAutoMigrationConfig|null); - - /** - * Creates a new UpdateAutoMigrationConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateAutoMigrationConfigRequest instance - */ - public static create(properties?: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; - - /** - * Encodes the specified UpdateAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. - * @param message UpdateAutoMigrationConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. - * @param message UpdateAutoMigrationConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateAutoMigrationConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; - - /** - * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateAutoMigrationConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; - - /** - * Verifies an UpdateAutoMigrationConfigRequest message. - * @param message Plain 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 UpdateAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateAutoMigrationConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; - - /** - * Creates a plain object from an UpdateAutoMigrationConfigRequest message. Also converts values to other types if specified. - * @param message UpdateAutoMigrationConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.config.v1.UpdateAutoMigrationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateAutoMigrationConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateAutoMigrationConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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. */ - 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 }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - - /** - * Verifies a Publishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - - /** - * Verifies a JavaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - - /** - * Verifies a CppSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - - /** - * Verifies a PhpSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; - - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - - /** - * Verifies a RubySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - - /** - * Verifies a MethodSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a FieldInfo. */ - interface IFieldInfo { - - /** FieldInfo format */ - format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); - } - - /** Represents a FieldInfo. */ - class FieldInfo implements IFieldInfo { - - /** - * Constructs a new FieldInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IFieldInfo); - - /** FieldInfo format. */ - public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); - - /** - * Creates a new FieldInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldInfo instance - */ - public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldInfo - * @throws {Error} If the payload is not 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.FieldInfo; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldInfo - * @throws {Error} If the payload 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.FieldInfo; - - /** - * Verifies a FieldInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldInfo - */ - public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @param message FieldInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldInfo { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - UUID4 = 1, - IPV4 = 2, - IPV6 = 3, - IPV4_OR_IPV6 = 4 - } - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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 { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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; - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** 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); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|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; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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 { - - /** 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|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[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * 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 }; - - /** - * 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; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a 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.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is 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.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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 { - - /** 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_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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 { - - /** 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 }; - - /** - * 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; - } - } - - /** 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions 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 features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions 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 features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** 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 }; - - /** - * 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 { - - /** 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 deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** 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 }; - - /** - * 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. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** 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 }; - - /** - * 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 { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a 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.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is 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.EditionDefault; - - /** - * Verifies an EditionDefault message. - * @param message Plain 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 EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** 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 features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** 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 }; - - /** - * 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. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|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 deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** 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 }; - - /** - * 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. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (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 features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: 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 }; - - /** - * 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. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** 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); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** 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 }; - - /** - * 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. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** 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 }; - - /** - * 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 { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|Buffer|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|Buffer|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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 { - - /** 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 }; - - /** - * 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; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** 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 }; - - /** - * 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 { - - /** 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 }; - - /** - * 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; - } - } - - /** 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 }; - - /** - * 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 { - - /** 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); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|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; - - /** 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 - * @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 }; - - /** - * 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 - } - } - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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 Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|Buffer|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|Buffer|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 }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an 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 }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldMask. */ - 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 }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Struct. */ - interface IStruct { - - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); - } - - /** Represents a Struct. */ - class Struct implements IStruct { - - /** - * Constructs a new Struct. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStruct); - - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; - - /** - * Creates a new Struct instance using the specified properties. - * @param [properties] Properties to set - * @returns Struct instance - */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; - - /** - * Verifies a Struct message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Struct - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Struct to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Struct - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Value. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); - - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); - - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); - } - - /** Represents a Value. */ - class Value implements IValue { - - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IValue); - - /** Value nullValue. */ - public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue. */ - public numberValue?: (number|null); - - /** Value stringValue. */ - public stringValue?: (string|null); - - /** Value boolValue. */ - public boolValue?: (boolean|null); - - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); - - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); - - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); - - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; - - /** - * Verifies a Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } - - /** Properties of a ListValue. */ - interface IListValue { - - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); - } - - /** Represents a ListValue. */ - class ListValue implements IListValue { - - /** - * Constructs a new ListValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IListValue); - - /** ListValue values. */ - public values: google.protobuf.IValue[]; - - /** - * Creates a new ListValue instance using the specified properties. - * @param [properties] Properties to set - * @returns ListValue instance - */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; - - /** - * Verifies a ListValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; - - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of 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 }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace longrunning. */ - namespace longrunning { - - /** Represents an Operations */ - class Operations extends $protobuf.rpc.Service { - - /** - * Constructs a new Operations service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new Operations service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperationsResponse - */ - public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @returns Promise - */ - public listOperations(request: google.longrunning.IListOperationsRequest): Promise; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @returns Promise - */ - public getOperation(request: google.longrunning.IGetOperationRequest): Promise; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @returns Promise - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @returns Promise - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @returns Promise - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; - } - - namespace Operations { - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @param error Error, if any - * @param [response] ListOperationsResponse - */ - type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of an Operation. */ - interface IOperation { - - /** Operation name */ - name?: (string|null); - - /** Operation metadata */ - metadata?: (google.protobuf.IAny|null); - - /** Operation done */ - done?: (boolean|null); - - /** Operation error */ - error?: (google.rpc.IStatus|null); - - /** Operation response */ - response?: (google.protobuf.IAny|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperation); - - /** Operation name. */ - public name: string; - - /** Operation metadata. */ - public metadata?: (google.protobuf.IAny|null); - - /** Operation done. */ - public done: boolean; - - /** Operation error. */ - public error?: (google.rpc.IStatus|null); - - /** Operation response. */ - public response?: (google.protobuf.IAny|null); - - /** Operation result. */ - public result?: ("error"|"response"); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; - - /** - * Verifies an Operation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Operation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOperationRequest. */ - interface IGetOperationRequest { - - /** GetOperationRequest name */ - name?: (string|null); - } - - /** Represents a GetOperationRequest. */ - class GetOperationRequest implements IGetOperationRequest { - - /** - * Constructs a new GetOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IGetOperationRequest); - - /** GetOperationRequest name. */ - public name: string; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOperationRequest instance - */ - public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; - - /** - * Verifies a GetOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @param message GetOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsRequest. */ - interface IListOperationsRequest { - - /** ListOperationsRequest name */ - name?: (string|null); - - /** ListOperationsRequest filter */ - filter?: (string|null); - - /** ListOperationsRequest pageSize */ - pageSize?: (number|null); - - /** ListOperationsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListOperationsRequest. */ - class ListOperationsRequest implements IListOperationsRequest { - - /** - * Constructs a new ListOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsRequest); - - /** ListOperationsRequest name. */ - public name: string; - - /** ListOperationsRequest filter. */ - public filter: string; - - /** ListOperationsRequest pageSize. */ - public pageSize: number; - - /** ListOperationsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsRequest instance - */ - public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; - - /** - * Verifies a ListOperationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @param message ListOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsResponse. */ - interface IListOperationsResponse { - - /** ListOperationsResponse operations */ - operations?: (google.longrunning.IOperation[]|null); - - /** ListOperationsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListOperationsResponse. */ - class ListOperationsResponse implements IListOperationsResponse { - - /** - * Constructs a new ListOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsResponse); - - /** ListOperationsResponse operations. */ - public operations: google.longrunning.IOperation[]; - - /** ListOperationsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsResponse instance - */ - public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; - - /** - * Verifies a ListOperationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @param message ListOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** CancelOperationRequest name */ - name?: (string|null); - } - - /** Represents a CancelOperationRequest. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.ICancelOperationRequest); - - /** CancelOperationRequest name. */ - public name: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; - - /** - * Verifies a CancelOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteOperationRequest. */ - interface IDeleteOperationRequest { - - /** DeleteOperationRequest name */ - name?: (string|null); - } - - /** Represents a DeleteOperationRequest. */ - class DeleteOperationRequest implements IDeleteOperationRequest { - - /** - * Constructs a new DeleteOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IDeleteOperationRequest); - - /** DeleteOperationRequest name. */ - public name: string; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteOperationRequest instance - */ - public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; - - /** - * Verifies a DeleteOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @param message DeleteOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WaitOperationRequest. */ - interface IWaitOperationRequest { - - /** WaitOperationRequest name */ - name?: (string|null); - - /** WaitOperationRequest timeout */ - timeout?: (google.protobuf.IDuration|null); - } - - /** Represents a WaitOperationRequest. */ - class WaitOperationRequest implements IWaitOperationRequest { - - /** - * Constructs a new WaitOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IWaitOperationRequest); - - /** WaitOperationRequest name. */ - public name: string; - - /** WaitOperationRequest timeout. */ - public timeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitOperationRequest instance - */ - public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; - - /** - * Verifies a WaitOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @param message WaitOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WaitOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OperationInfo. */ - interface IOperationInfo { - - /** OperationInfo responseType */ - responseType?: (string|null); - - /** OperationInfo metadataType */ - metadataType?: (string|null); - } - - /** Represents an OperationInfo. */ - class OperationInfo implements IOperationInfo { - - /** - * Constructs a new OperationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperationInfo); - - /** OperationInfo responseType. */ - public responseType: string; - - /** OperationInfo metadataType. */ - public metadataType: string; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationInfo instance - */ - public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; - - /** - * Verifies an OperationInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationInfo - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @param message OperationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-cloud-config/protos/protos.js b/owl-bot-staging/google-cloud-config/protos/protos.js deleted file mode 100644 index b818a1c3234..00000000000 --- a/owl-bot-staging/google-cloud-config/protos/protos.js +++ /dev/null @@ -1,43640 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots._google_cloud_config_protos || ($protobuf.roots._google_cloud_config_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.config = (function() { - - /** - * Namespace config. - * @memberof google.cloud - * @namespace - */ - var config = {}; - - config.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.config - * @namespace - */ - var v1 = {}; - - v1.Config = (function() { - - /** - * Constructs a new Config service. - * @memberof google.cloud.config.v1 - * @classdesc Represents a Config - * @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 Config(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Config.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Config; - - /** - * Creates new Config service using the specified rpc implementation. - * @function create - * @memberof google.cloud.config.v1.Config - * @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 {Config} RPC service. Useful where requests and/or responses are streamed. - */ - Config.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listDeployments}. - * @memberof google.cloud.config.v1.Config - * @typedef ListDeploymentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.ListDeploymentsResponse} [response] ListDeploymentsResponse - */ - - /** - * Calls ListDeployments. - * @function listDeployments - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object - * @param {google.cloud.config.v1.Config.ListDeploymentsCallback} callback Node-style callback called with the error, if any, and ListDeploymentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.listDeployments = function listDeployments(request, callback) { - return this.rpcCall(listDeployments, $root.google.cloud.config.v1.ListDeploymentsRequest, $root.google.cloud.config.v1.ListDeploymentsResponse, request, callback); - }, "name", { value: "ListDeployments" }); - - /** - * Calls ListDeployments. - * @function listDeployments - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getDeployment}. - * @memberof google.cloud.config.v1.Config - * @typedef GetDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.Deployment} [response] Deployment - */ - - /** - * Calls GetDeployment. - * @function getDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetDeploymentRequest} request GetDeploymentRequest message or plain object - * @param {google.cloud.config.v1.Config.GetDeploymentCallback} callback Node-style callback called with the error, if any, and Deployment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.getDeployment = function getDeployment(request, callback) { - return this.rpcCall(getDeployment, $root.google.cloud.config.v1.GetDeploymentRequest, $root.google.cloud.config.v1.Deployment, request, callback); - }, "name", { value: "GetDeployment" }); - - /** - * Calls GetDeployment. - * @function getDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetDeploymentRequest} request GetDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|createDeployment}. - * @memberof google.cloud.config.v1.Config - * @typedef CreateDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateDeployment. - * @function createDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.ICreateDeploymentRequest} request CreateDeploymentRequest message or plain object - * @param {google.cloud.config.v1.Config.CreateDeploymentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.createDeployment = function createDeployment(request, callback) { - return this.rpcCall(createDeployment, $root.google.cloud.config.v1.CreateDeploymentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateDeployment" }); - - /** - * Calls CreateDeployment. - * @function createDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.ICreateDeploymentRequest} request CreateDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|updateDeployment}. - * @memberof google.cloud.config.v1.Config - * @typedef UpdateDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateDeployment. - * @function updateDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IUpdateDeploymentRequest} request UpdateDeploymentRequest message or plain object - * @param {google.cloud.config.v1.Config.UpdateDeploymentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.updateDeployment = function updateDeployment(request, callback) { - return this.rpcCall(updateDeployment, $root.google.cloud.config.v1.UpdateDeploymentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateDeployment" }); - - /** - * Calls UpdateDeployment. - * @function updateDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IUpdateDeploymentRequest} request UpdateDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|deleteDeployment}. - * @memberof google.cloud.config.v1.Config - * @typedef DeleteDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteDeployment. - * @function deleteDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IDeleteDeploymentRequest} request DeleteDeploymentRequest message or plain object - * @param {google.cloud.config.v1.Config.DeleteDeploymentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.deleteDeployment = function deleteDeployment(request, callback) { - return this.rpcCall(deleteDeployment, $root.google.cloud.config.v1.DeleteDeploymentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteDeployment" }); - - /** - * Calls DeleteDeployment. - * @function deleteDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IDeleteDeploymentRequest} request DeleteDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listRevisions}. - * @memberof google.cloud.config.v1.Config - * @typedef ListRevisionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.ListRevisionsResponse} [response] ListRevisionsResponse - */ - - /** - * Calls ListRevisions. - * @function listRevisions - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListRevisionsRequest} request ListRevisionsRequest message or plain object - * @param {google.cloud.config.v1.Config.ListRevisionsCallback} callback Node-style callback called with the error, if any, and ListRevisionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.listRevisions = function listRevisions(request, callback) { - return this.rpcCall(listRevisions, $root.google.cloud.config.v1.ListRevisionsRequest, $root.google.cloud.config.v1.ListRevisionsResponse, request, callback); - }, "name", { value: "ListRevisions" }); - - /** - * Calls ListRevisions. - * @function listRevisions - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListRevisionsRequest} request ListRevisionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getRevision}. - * @memberof google.cloud.config.v1.Config - * @typedef GetRevisionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.Revision} [response] Revision - */ - - /** - * Calls GetRevision. - * @function getRevision - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetRevisionRequest} request GetRevisionRequest message or plain object - * @param {google.cloud.config.v1.Config.GetRevisionCallback} callback Node-style callback called with the error, if any, and Revision - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.getRevision = function getRevision(request, callback) { - return this.rpcCall(getRevision, $root.google.cloud.config.v1.GetRevisionRequest, $root.google.cloud.config.v1.Revision, request, callback); - }, "name", { value: "GetRevision" }); - - /** - * Calls GetRevision. - * @function getRevision - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetRevisionRequest} request GetRevisionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getResource}. - * @memberof google.cloud.config.v1.Config - * @typedef GetResourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.Resource} [response] Resource - */ - - /** - * Calls GetResource. - * @function getResource - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetResourceRequest} request GetResourceRequest message or plain object - * @param {google.cloud.config.v1.Config.GetResourceCallback} callback Node-style callback called with the error, if any, and Resource - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.getResource = function getResource(request, callback) { - return this.rpcCall(getResource, $root.google.cloud.config.v1.GetResourceRequest, $root.google.cloud.config.v1.Resource, request, callback); - }, "name", { value: "GetResource" }); - - /** - * Calls GetResource. - * @function getResource - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetResourceRequest} request GetResourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listResources}. - * @memberof google.cloud.config.v1.Config - * @typedef ListResourcesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.ListResourcesResponse} [response] ListResourcesResponse - */ - - /** - * Calls ListResources. - * @function listResources - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListResourcesRequest} request ListResourcesRequest message or plain object - * @param {google.cloud.config.v1.Config.ListResourcesCallback} callback Node-style callback called with the error, if any, and ListResourcesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.listResources = function listResources(request, callback) { - return this.rpcCall(listResources, $root.google.cloud.config.v1.ListResourcesRequest, $root.google.cloud.config.v1.ListResourcesResponse, request, callback); - }, "name", { value: "ListResources" }); - - /** - * Calls ListResources. - * @function listResources - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListResourcesRequest} request ListResourcesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|exportDeploymentStatefile}. - * @memberof google.cloud.config.v1.Config - * @typedef ExportDeploymentStatefileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.Statefile} [response] Statefile - */ - - /** - * Calls ExportDeploymentStatefile. - * @function exportDeploymentStatefile - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest} request ExportDeploymentStatefileRequest message or plain object - * @param {google.cloud.config.v1.Config.ExportDeploymentStatefileCallback} callback Node-style callback called with the error, if any, and Statefile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.exportDeploymentStatefile = function exportDeploymentStatefile(request, callback) { - return this.rpcCall(exportDeploymentStatefile, $root.google.cloud.config.v1.ExportDeploymentStatefileRequest, $root.google.cloud.config.v1.Statefile, request, callback); - }, "name", { value: "ExportDeploymentStatefile" }); - - /** - * Calls ExportDeploymentStatefile. - * @function exportDeploymentStatefile - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest} request ExportDeploymentStatefileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|exportRevisionStatefile}. - * @memberof google.cloud.config.v1.Config - * @typedef ExportRevisionStatefileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.Statefile} [response] Statefile - */ - - /** - * Calls ExportRevisionStatefile. - * @function exportRevisionStatefile - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IExportRevisionStatefileRequest} request ExportRevisionStatefileRequest message or plain object - * @param {google.cloud.config.v1.Config.ExportRevisionStatefileCallback} callback Node-style callback called with the error, if any, and Statefile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.exportRevisionStatefile = function exportRevisionStatefile(request, callback) { - return this.rpcCall(exportRevisionStatefile, $root.google.cloud.config.v1.ExportRevisionStatefileRequest, $root.google.cloud.config.v1.Statefile, request, callback); - }, "name", { value: "ExportRevisionStatefile" }); - - /** - * Calls ExportRevisionStatefile. - * @function exportRevisionStatefile - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IExportRevisionStatefileRequest} request ExportRevisionStatefileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|importStatefile}. - * @memberof google.cloud.config.v1.Config - * @typedef ImportStatefileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.Statefile} [response] Statefile - */ - - /** - * Calls ImportStatefile. - * @function importStatefile - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IImportStatefileRequest} request ImportStatefileRequest message or plain object - * @param {google.cloud.config.v1.Config.ImportStatefileCallback} callback Node-style callback called with the error, if any, and Statefile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.importStatefile = function importStatefile(request, callback) { - return this.rpcCall(importStatefile, $root.google.cloud.config.v1.ImportStatefileRequest, $root.google.cloud.config.v1.Statefile, request, callback); - }, "name", { value: "ImportStatefile" }); - - /** - * Calls ImportStatefile. - * @function importStatefile - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IImportStatefileRequest} request ImportStatefileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|deleteStatefile}. - * @memberof google.cloud.config.v1.Config - * @typedef DeleteStatefileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteStatefile. - * @function deleteStatefile - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IDeleteStatefileRequest} request DeleteStatefileRequest message or plain object - * @param {google.cloud.config.v1.Config.DeleteStatefileCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.deleteStatefile = function deleteStatefile(request, callback) { - return this.rpcCall(deleteStatefile, $root.google.cloud.config.v1.DeleteStatefileRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteStatefile" }); - - /** - * Calls DeleteStatefile. - * @function deleteStatefile - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IDeleteStatefileRequest} request DeleteStatefileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|lockDeployment}. - * @memberof google.cloud.config.v1.Config - * @typedef LockDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls LockDeployment. - * @function lockDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.ILockDeploymentRequest} request LockDeploymentRequest message or plain object - * @param {google.cloud.config.v1.Config.LockDeploymentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.lockDeployment = function lockDeployment(request, callback) { - return this.rpcCall(lockDeployment, $root.google.cloud.config.v1.LockDeploymentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "LockDeployment" }); - - /** - * Calls LockDeployment. - * @function lockDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.ILockDeploymentRequest} request LockDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|unlockDeployment}. - * @memberof google.cloud.config.v1.Config - * @typedef UnlockDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UnlockDeployment. - * @function unlockDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IUnlockDeploymentRequest} request UnlockDeploymentRequest message or plain object - * @param {google.cloud.config.v1.Config.UnlockDeploymentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.unlockDeployment = function unlockDeployment(request, callback) { - return this.rpcCall(unlockDeployment, $root.google.cloud.config.v1.UnlockDeploymentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UnlockDeployment" }); - - /** - * Calls UnlockDeployment. - * @function unlockDeployment - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IUnlockDeploymentRequest} request UnlockDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|exportLockInfo}. - * @memberof google.cloud.config.v1.Config - * @typedef ExportLockInfoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.LockInfo} [response] LockInfo - */ - - /** - * Calls ExportLockInfo. - * @function exportLockInfo - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IExportLockInfoRequest} request ExportLockInfoRequest message or plain object - * @param {google.cloud.config.v1.Config.ExportLockInfoCallback} callback Node-style callback called with the error, if any, and LockInfo - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.exportLockInfo = function exportLockInfo(request, callback) { - return this.rpcCall(exportLockInfo, $root.google.cloud.config.v1.ExportLockInfoRequest, $root.google.cloud.config.v1.LockInfo, request, callback); - }, "name", { value: "ExportLockInfo" }); - - /** - * Calls ExportLockInfo. - * @function exportLockInfo - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IExportLockInfoRequest} request ExportLockInfoRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|createPreview}. - * @memberof google.cloud.config.v1.Config - * @typedef CreatePreviewCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreatePreview. - * @function createPreview - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.ICreatePreviewRequest} request CreatePreviewRequest message or plain object - * @param {google.cloud.config.v1.Config.CreatePreviewCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.createPreview = function createPreview(request, callback) { - return this.rpcCall(createPreview, $root.google.cloud.config.v1.CreatePreviewRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreatePreview" }); - - /** - * Calls CreatePreview. - * @function createPreview - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.ICreatePreviewRequest} request CreatePreviewRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getPreview}. - * @memberof google.cloud.config.v1.Config - * @typedef GetPreviewCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.Preview} [response] Preview - */ - - /** - * Calls GetPreview. - * @function getPreview - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetPreviewRequest} request GetPreviewRequest message or plain object - * @param {google.cloud.config.v1.Config.GetPreviewCallback} callback Node-style callback called with the error, if any, and Preview - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.getPreview = function getPreview(request, callback) { - return this.rpcCall(getPreview, $root.google.cloud.config.v1.GetPreviewRequest, $root.google.cloud.config.v1.Preview, request, callback); - }, "name", { value: "GetPreview" }); - - /** - * Calls GetPreview. - * @function getPreview - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetPreviewRequest} request GetPreviewRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listPreviews}. - * @memberof google.cloud.config.v1.Config - * @typedef ListPreviewsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.ListPreviewsResponse} [response] ListPreviewsResponse - */ - - /** - * Calls ListPreviews. - * @function listPreviews - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListPreviewsRequest} request ListPreviewsRequest message or plain object - * @param {google.cloud.config.v1.Config.ListPreviewsCallback} callback Node-style callback called with the error, if any, and ListPreviewsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.listPreviews = function listPreviews(request, callback) { - return this.rpcCall(listPreviews, $root.google.cloud.config.v1.ListPreviewsRequest, $root.google.cloud.config.v1.ListPreviewsResponse, request, callback); - }, "name", { value: "ListPreviews" }); - - /** - * Calls ListPreviews. - * @function listPreviews - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListPreviewsRequest} request ListPreviewsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|deletePreview}. - * @memberof google.cloud.config.v1.Config - * @typedef DeletePreviewCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeletePreview. - * @function deletePreview - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IDeletePreviewRequest} request DeletePreviewRequest message or plain object - * @param {google.cloud.config.v1.Config.DeletePreviewCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.deletePreview = function deletePreview(request, callback) { - return this.rpcCall(deletePreview, $root.google.cloud.config.v1.DeletePreviewRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeletePreview" }); - - /** - * Calls DeletePreview. - * @function deletePreview - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IDeletePreviewRequest} request DeletePreviewRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|exportPreviewResult}. - * @memberof google.cloud.config.v1.Config - * @typedef ExportPreviewResultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.ExportPreviewResultResponse} [response] ExportPreviewResultResponse - */ - - /** - * Calls ExportPreviewResult. - * @function exportPreviewResult - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IExportPreviewResultRequest} request ExportPreviewResultRequest message or plain object - * @param {google.cloud.config.v1.Config.ExportPreviewResultCallback} callback Node-style callback called with the error, if any, and ExportPreviewResultResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.exportPreviewResult = function exportPreviewResult(request, callback) { - return this.rpcCall(exportPreviewResult, $root.google.cloud.config.v1.ExportPreviewResultRequest, $root.google.cloud.config.v1.ExportPreviewResultResponse, request, callback); - }, "name", { value: "ExportPreviewResult" }); - - /** - * Calls ExportPreviewResult. - * @function exportPreviewResult - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IExportPreviewResultRequest} request ExportPreviewResultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listTerraformVersions}. - * @memberof google.cloud.config.v1.Config - * @typedef ListTerraformVersionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.ListTerraformVersionsResponse} [response] ListTerraformVersionsResponse - */ - - /** - * Calls ListTerraformVersions. - * @function listTerraformVersions - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListTerraformVersionsRequest} request ListTerraformVersionsRequest message or plain object - * @param {google.cloud.config.v1.Config.ListTerraformVersionsCallback} callback Node-style callback called with the error, if any, and ListTerraformVersionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.listTerraformVersions = function listTerraformVersions(request, callback) { - return this.rpcCall(listTerraformVersions, $root.google.cloud.config.v1.ListTerraformVersionsRequest, $root.google.cloud.config.v1.ListTerraformVersionsResponse, request, callback); - }, "name", { value: "ListTerraformVersions" }); - - /** - * Calls ListTerraformVersions. - * @function listTerraformVersions - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListTerraformVersionsRequest} request ListTerraformVersionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getTerraformVersion}. - * @memberof google.cloud.config.v1.Config - * @typedef GetTerraformVersionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.TerraformVersion} [response] TerraformVersion - */ - - /** - * Calls GetTerraformVersion. - * @function getTerraformVersion - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetTerraformVersionRequest} request GetTerraformVersionRequest message or plain object - * @param {google.cloud.config.v1.Config.GetTerraformVersionCallback} callback Node-style callback called with the error, if any, and TerraformVersion - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.getTerraformVersion = function getTerraformVersion(request, callback) { - return this.rpcCall(getTerraformVersion, $root.google.cloud.config.v1.GetTerraformVersionRequest, $root.google.cloud.config.v1.TerraformVersion, request, callback); - }, "name", { value: "GetTerraformVersion" }); - - /** - * Calls GetTerraformVersion. - * @function getTerraformVersion - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetTerraformVersionRequest} request GetTerraformVersionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listResourceChanges}. - * @memberof google.cloud.config.v1.Config - * @typedef ListResourceChangesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.ListResourceChangesResponse} [response] ListResourceChangesResponse - */ - - /** - * Calls ListResourceChanges. - * @function listResourceChanges - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListResourceChangesRequest} request ListResourceChangesRequest message or plain object - * @param {google.cloud.config.v1.Config.ListResourceChangesCallback} callback Node-style callback called with the error, if any, and ListResourceChangesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.listResourceChanges = function listResourceChanges(request, callback) { - return this.rpcCall(listResourceChanges, $root.google.cloud.config.v1.ListResourceChangesRequest, $root.google.cloud.config.v1.ListResourceChangesResponse, request, callback); - }, "name", { value: "ListResourceChanges" }); - - /** - * Calls ListResourceChanges. - * @function listResourceChanges - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListResourceChangesRequest} request ListResourceChangesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getResourceChange}. - * @memberof google.cloud.config.v1.Config - * @typedef GetResourceChangeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.ResourceChange} [response] ResourceChange - */ - - /** - * Calls GetResourceChange. - * @function getResourceChange - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetResourceChangeRequest} request GetResourceChangeRequest message or plain object - * @param {google.cloud.config.v1.Config.GetResourceChangeCallback} callback Node-style callback called with the error, if any, and ResourceChange - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.getResourceChange = function getResourceChange(request, callback) { - return this.rpcCall(getResourceChange, $root.google.cloud.config.v1.GetResourceChangeRequest, $root.google.cloud.config.v1.ResourceChange, request, callback); - }, "name", { value: "GetResourceChange" }); - - /** - * Calls GetResourceChange. - * @function getResourceChange - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetResourceChangeRequest} request GetResourceChangeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|listResourceDrifts}. - * @memberof google.cloud.config.v1.Config - * @typedef ListResourceDriftsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.ListResourceDriftsResponse} [response] ListResourceDriftsResponse - */ - - /** - * Calls ListResourceDrifts. - * @function listResourceDrifts - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListResourceDriftsRequest} request ListResourceDriftsRequest message or plain object - * @param {google.cloud.config.v1.Config.ListResourceDriftsCallback} callback Node-style callback called with the error, if any, and ListResourceDriftsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.listResourceDrifts = function listResourceDrifts(request, callback) { - return this.rpcCall(listResourceDrifts, $root.google.cloud.config.v1.ListResourceDriftsRequest, $root.google.cloud.config.v1.ListResourceDriftsResponse, request, callback); - }, "name", { value: "ListResourceDrifts" }); - - /** - * Calls ListResourceDrifts. - * @function listResourceDrifts - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IListResourceDriftsRequest} request ListResourceDriftsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getResourceDrift}. - * @memberof google.cloud.config.v1.Config - * @typedef GetResourceDriftCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.ResourceDrift} [response] ResourceDrift - */ - - /** - * Calls GetResourceDrift. - * @function getResourceDrift - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetResourceDriftRequest} request GetResourceDriftRequest message or plain object - * @param {google.cloud.config.v1.Config.GetResourceDriftCallback} callback Node-style callback called with the error, if any, and ResourceDrift - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.getResourceDrift = function getResourceDrift(request, callback) { - return this.rpcCall(getResourceDrift, $root.google.cloud.config.v1.GetResourceDriftRequest, $root.google.cloud.config.v1.ResourceDrift, request, callback); - }, "name", { value: "GetResourceDrift" }); - - /** - * Calls GetResourceDrift. - * @function getResourceDrift - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetResourceDriftRequest} request GetResourceDriftRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|getAutoMigrationConfig}. - * @memberof google.cloud.config.v1.Config - * @typedef GetAutoMigrationConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.config.v1.AutoMigrationConfig} [response] AutoMigrationConfig - */ - - /** - * Calls GetAutoMigrationConfig. - * @function getAutoMigrationConfig - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} request GetAutoMigrationConfigRequest message or plain object - * @param {google.cloud.config.v1.Config.GetAutoMigrationConfigCallback} callback Node-style callback called with the error, if any, and AutoMigrationConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.getAutoMigrationConfig = function getAutoMigrationConfig(request, callback) { - return this.rpcCall(getAutoMigrationConfig, $root.google.cloud.config.v1.GetAutoMigrationConfigRequest, $root.google.cloud.config.v1.AutoMigrationConfig, request, callback); - }, "name", { value: "GetAutoMigrationConfig" }); - - /** - * Calls GetAutoMigrationConfig. - * @function getAutoMigrationConfig - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} request GetAutoMigrationConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.config.v1.Config|updateAutoMigrationConfig}. - * @memberof google.cloud.config.v1.Config - * @typedef UpdateAutoMigrationConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateAutoMigrationConfig. - * @function updateAutoMigrationConfig - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} request UpdateAutoMigrationConfigRequest message or plain object - * @param {google.cloud.config.v1.Config.UpdateAutoMigrationConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.updateAutoMigrationConfig = function updateAutoMigrationConfig(request, callback) { - return this.rpcCall(updateAutoMigrationConfig, $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateAutoMigrationConfig" }); - - /** - * Calls UpdateAutoMigrationConfig. - * @function updateAutoMigrationConfig - * @memberof google.cloud.config.v1.Config - * @instance - * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} request UpdateAutoMigrationConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Config; - })(); - - /** - * QuotaValidation enum. - * @name google.cloud.config.v1.QuotaValidation - * @enum {number} - * @property {number} QUOTA_VALIDATION_UNSPECIFIED=0 QUOTA_VALIDATION_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} ENFORCED=2 ENFORCED value - */ - v1.QuotaValidation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "QUOTA_VALIDATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "ENFORCED"] = 2; - return values; - })(); - - v1.Deployment = (function() { - - /** - * Properties of a Deployment. - * @memberof google.cloud.config.v1 - * @interface IDeployment - * @property {google.cloud.config.v1.ITerraformBlueprint|null} [terraformBlueprint] Deployment terraformBlueprint - * @property {string|null} [name] Deployment name - * @property {google.protobuf.ITimestamp|null} [createTime] Deployment createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Deployment updateTime - * @property {Object.|null} [labels] Deployment labels - * @property {google.cloud.config.v1.Deployment.State|null} [state] Deployment state - * @property {string|null} [latestRevision] Deployment latestRevision - * @property {string|null} [stateDetail] Deployment stateDetail - * @property {google.cloud.config.v1.Deployment.ErrorCode|null} [errorCode] Deployment errorCode - * @property {google.cloud.config.v1.IApplyResults|null} [deleteResults] Deployment deleteResults - * @property {string|null} [deleteBuild] Deployment deleteBuild - * @property {string|null} [deleteLogs] Deployment deleteLogs - * @property {Array.|null} [tfErrors] Deployment tfErrors - * @property {string|null} [errorLogs] Deployment errorLogs - * @property {string|null} [artifactsGcsBucket] Deployment artifactsGcsBucket - * @property {string|null} [serviceAccount] Deployment serviceAccount - * @property {boolean|null} [importExistingResources] Deployment importExistingResources - * @property {string|null} [workerPool] Deployment workerPool - * @property {google.cloud.config.v1.Deployment.LockState|null} [lockState] Deployment lockState - * @property {string|null} [tfVersionConstraint] Deployment tfVersionConstraint - * @property {string|null} [tfVersion] Deployment tfVersion - * @property {google.cloud.config.v1.QuotaValidation|null} [quotaValidation] Deployment quotaValidation - * @property {Object.|null} [annotations] Deployment annotations - * @property {google.cloud.config.v1.IProviderConfig|null} [providerConfig] Deployment providerConfig - */ - - /** - * Constructs a new Deployment. - * @memberof google.cloud.config.v1 - * @classdesc Represents a Deployment. - * @implements IDeployment - * @constructor - * @param {google.cloud.config.v1.IDeployment=} [properties] Properties to set - */ - function Deployment(properties) { - this.labels = {}; - this.tfErrors = []; - this.annotations = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Deployment terraformBlueprint. - * @member {google.cloud.config.v1.ITerraformBlueprint|null|undefined} terraformBlueprint - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.terraformBlueprint = null; - - /** - * Deployment name. - * @member {string} name - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.name = ""; - - /** - * Deployment createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.createTime = null; - - /** - * Deployment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.updateTime = null; - - /** - * Deployment labels. - * @member {Object.} labels - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.labels = $util.emptyObject; - - /** - * Deployment state. - * @member {google.cloud.config.v1.Deployment.State} state - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.state = 0; - - /** - * Deployment latestRevision. - * @member {string} latestRevision - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.latestRevision = ""; - - /** - * Deployment stateDetail. - * @member {string} stateDetail - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.stateDetail = ""; - - /** - * Deployment errorCode. - * @member {google.cloud.config.v1.Deployment.ErrorCode} errorCode - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.errorCode = 0; - - /** - * Deployment deleteResults. - * @member {google.cloud.config.v1.IApplyResults|null|undefined} deleteResults - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.deleteResults = null; - - /** - * Deployment deleteBuild. - * @member {string} deleteBuild - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.deleteBuild = ""; - - /** - * Deployment deleteLogs. - * @member {string} deleteLogs - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.deleteLogs = ""; - - /** - * Deployment tfErrors. - * @member {Array.} tfErrors - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.tfErrors = $util.emptyArray; - - /** - * Deployment errorLogs. - * @member {string} errorLogs - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.errorLogs = ""; - - /** - * Deployment artifactsGcsBucket. - * @member {string|null|undefined} artifactsGcsBucket - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.artifactsGcsBucket = null; - - /** - * Deployment serviceAccount. - * @member {string|null|undefined} serviceAccount - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.serviceAccount = null; - - /** - * Deployment importExistingResources. - * @member {boolean|null|undefined} importExistingResources - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.importExistingResources = null; - - /** - * Deployment workerPool. - * @member {string|null|undefined} workerPool - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.workerPool = null; - - /** - * Deployment lockState. - * @member {google.cloud.config.v1.Deployment.LockState} lockState - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.lockState = 0; - - /** - * Deployment tfVersionConstraint. - * @member {string|null|undefined} tfVersionConstraint - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.tfVersionConstraint = null; - - /** - * Deployment tfVersion. - * @member {string} tfVersion - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.tfVersion = ""; - - /** - * Deployment quotaValidation. - * @member {google.cloud.config.v1.QuotaValidation} quotaValidation - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.quotaValidation = 0; - - /** - * Deployment annotations. - * @member {Object.} annotations - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.annotations = $util.emptyObject; - - /** - * Deployment providerConfig. - * @member {google.cloud.config.v1.IProviderConfig|null|undefined} providerConfig - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Deployment.prototype.providerConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Deployment blueprint. - * @member {"terraformBlueprint"|undefined} blueprint - * @memberof google.cloud.config.v1.Deployment - * @instance - */ - Object.defineProperty(Deployment.prototype, "blueprint", { - get: $util.oneOfGetter($oneOfFields = ["terraformBlueprint"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Deployment.prototype, "_artifactsGcsBucket", { - get: $util.oneOfGetter($oneOfFields = ["artifactsGcsBucket"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Deployment.prototype, "_serviceAccount", { - get: $util.oneOfGetter($oneOfFields = ["serviceAccount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Deployment.prototype, "_importExistingResources", { - get: $util.oneOfGetter($oneOfFields = ["importExistingResources"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Deployment.prototype, "_workerPool", { - get: $util.oneOfGetter($oneOfFields = ["workerPool"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Deployment.prototype, "_tfVersionConstraint", { - get: $util.oneOfGetter($oneOfFields = ["tfVersionConstraint"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Deployment instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.Deployment - * @static - * @param {google.cloud.config.v1.IDeployment=} [properties] Properties to set - * @returns {google.cloud.config.v1.Deployment} Deployment instance - */ - Deployment.create = function create(properties) { - return new Deployment(properties); - }; - - /** - * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.config.v1.Deployment.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.Deployment - * @static - * @param {google.cloud.config.v1.IDeployment} message Deployment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Deployment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.terraformBlueprint != null && Object.hasOwnProperty.call(message, "terraformBlueprint")) - $root.google.cloud.config.v1.TerraformBlueprint.encode(message.terraformBlueprint, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.latestRevision != null && Object.hasOwnProperty.call(message, "latestRevision")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.latestRevision); - if (message.deleteResults != null && Object.hasOwnProperty.call(message, "deleteResults")) - $root.google.cloud.config.v1.ApplyResults.encode(message.deleteResults, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.stateDetail != null && Object.hasOwnProperty.call(message, "stateDetail")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.stateDetail); - if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.errorCode); - if (message.deleteBuild != null && Object.hasOwnProperty.call(message, "deleteBuild")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.deleteBuild); - if (message.deleteLogs != null && Object.hasOwnProperty.call(message, "deleteLogs")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.deleteLogs); - if (message.tfErrors != null && message.tfErrors.length) - for (var i = 0; i < message.tfErrors.length; ++i) - $root.google.cloud.config.v1.TerraformError.encode(message.tfErrors[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.errorLogs != null && Object.hasOwnProperty.call(message, "errorLogs")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.errorLogs); - if (message.artifactsGcsBucket != null && Object.hasOwnProperty.call(message, "artifactsGcsBucket")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.artifactsGcsBucket); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.serviceAccount); - if (message.importExistingResources != null && Object.hasOwnProperty.call(message, "importExistingResources")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.importExistingResources); - if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.workerPool); - if (message.lockState != null && Object.hasOwnProperty.call(message, "lockState")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.lockState); - if (message.tfVersionConstraint != null && Object.hasOwnProperty.call(message, "tfVersionConstraint")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.tfVersionConstraint); - if (message.tfVersion != null && Object.hasOwnProperty.call(message, "tfVersion")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.tfVersion); - if (message.quotaValidation != null && Object.hasOwnProperty.call(message, "quotaValidation")) - writer.uint32(/* id 23, wireType 0 =*/184).int32(message.quotaValidation); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 24, wireType 2 =*/194).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.providerConfig != null && Object.hasOwnProperty.call(message, "providerConfig")) - $root.google.cloud.config.v1.ProviderConfig.encode(message.providerConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.config.v1.Deployment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.Deployment - * @static - * @param {google.cloud.config.v1.IDeployment} message Deployment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Deployment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Deployment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.Deployment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.Deployment} Deployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Deployment.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.Deployment(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 6: { - message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.decode(reader, reader.uint32()); - break; - } - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 7: { - message.latestRevision = reader.string(); - break; - } - case 9: { - message.stateDetail = reader.string(); - break; - } - case 10: { - message.errorCode = reader.int32(); - break; - } - case 8: { - message.deleteResults = $root.google.cloud.config.v1.ApplyResults.decode(reader, reader.uint32()); - break; - } - case 11: { - message.deleteBuild = reader.string(); - break; - } - case 12: { - message.deleteLogs = reader.string(); - break; - } - case 13: { - if (!(message.tfErrors && message.tfErrors.length)) - message.tfErrors = []; - message.tfErrors.push($root.google.cloud.config.v1.TerraformError.decode(reader, reader.uint32())); - break; - } - case 14: { - message.errorLogs = reader.string(); - break; - } - case 15: { - message.artifactsGcsBucket = reader.string(); - break; - } - case 16: { - message.serviceAccount = reader.string(); - break; - } - case 17: { - message.importExistingResources = reader.bool(); - break; - } - case 19: { - message.workerPool = reader.string(); - break; - } - case 20: { - message.lockState = reader.int32(); - break; - } - case 21: { - message.tfVersionConstraint = reader.string(); - break; - } - case 22: { - message.tfVersion = reader.string(); - break; - } - case 23: { - message.quotaValidation = reader.int32(); - break; - } - case 24: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.annotations[key] = value; - break; - } - case 25: { - message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Deployment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.Deployment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.Deployment} Deployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Deployment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Deployment message. - * @function verify - * @memberof google.cloud.config.v1.Deployment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Deployment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { - properties.blueprint = 1; - { - var error = $root.google.cloud.config.v1.TerraformBlueprint.verify(message.terraformBlueprint); - if (error) - return "terraformBlueprint." + error; - } - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.latestRevision != null && message.hasOwnProperty("latestRevision")) - if (!$util.isString(message.latestRevision)) - return "latestRevision: string expected"; - if (message.stateDetail != null && message.hasOwnProperty("stateDetail")) - if (!$util.isString(message.stateDetail)) - return "stateDetail: string expected"; - if (message.errorCode != null && message.hasOwnProperty("errorCode")) - switch (message.errorCode) { - default: - return "errorCode: enum value expected"; - case 0: - case 1: - case 3: - case 5: - case 6: - case 7: - case 8: - case 10: - break; - } - if (message.deleteResults != null && message.hasOwnProperty("deleteResults")) { - var error = $root.google.cloud.config.v1.ApplyResults.verify(message.deleteResults); - if (error) - return "deleteResults." + error; - } - if (message.deleteBuild != null && message.hasOwnProperty("deleteBuild")) - if (!$util.isString(message.deleteBuild)) - return "deleteBuild: string expected"; - if (message.deleteLogs != null && message.hasOwnProperty("deleteLogs")) - if (!$util.isString(message.deleteLogs)) - return "deleteLogs: string expected"; - if (message.tfErrors != null && message.hasOwnProperty("tfErrors")) { - if (!Array.isArray(message.tfErrors)) - return "tfErrors: array expected"; - for (var i = 0; i < message.tfErrors.length; ++i) { - var error = $root.google.cloud.config.v1.TerraformError.verify(message.tfErrors[i]); - if (error) - return "tfErrors." + error; - } - } - if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) - if (!$util.isString(message.errorLogs)) - return "errorLogs: string expected"; - if (message.artifactsGcsBucket != null && message.hasOwnProperty("artifactsGcsBucket")) { - properties._artifactsGcsBucket = 1; - if (!$util.isString(message.artifactsGcsBucket)) - return "artifactsGcsBucket: string expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { - properties._serviceAccount = 1; - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - } - if (message.importExistingResources != null && message.hasOwnProperty("importExistingResources")) { - properties._importExistingResources = 1; - if (typeof message.importExistingResources !== "boolean") - return "importExistingResources: boolean expected"; - } - if (message.workerPool != null && message.hasOwnProperty("workerPool")) { - properties._workerPool = 1; - if (!$util.isString(message.workerPool)) - return "workerPool: string expected"; - } - if (message.lockState != null && message.hasOwnProperty("lockState")) - switch (message.lockState) { - default: - return "lockState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) { - properties._tfVersionConstraint = 1; - if (!$util.isString(message.tfVersionConstraint)) - return "tfVersionConstraint: string expected"; - } - if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) - if (!$util.isString(message.tfVersion)) - return "tfVersion: string expected"; - if (message.quotaValidation != null && message.hasOwnProperty("quotaValidation")) - switch (message.quotaValidation) { - default: - return "quotaValidation: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) { - var error = $root.google.cloud.config.v1.ProviderConfig.verify(message.providerConfig); - if (error) - return "providerConfig." + error; - } - return null; - }; - - /** - * Creates a Deployment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.Deployment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.Deployment} Deployment - */ - Deployment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.Deployment) - return object; - var message = new $root.google.cloud.config.v1.Deployment(); - if (object.terraformBlueprint != null) { - if (typeof object.terraformBlueprint !== "object") - throw TypeError(".google.cloud.config.v1.Deployment.terraformBlueprint: object expected"); - message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.fromObject(object.terraformBlueprint); - } - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.config.v1.Deployment.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.config.v1.Deployment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.config.v1.Deployment.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "ACTIVE": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "DELETING": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "SUSPENDED": - case 6: - message.state = 6; - break; - case "DELETED": - case 7: - message.state = 7; - break; - } - if (object.latestRevision != null) - message.latestRevision = String(object.latestRevision); - if (object.stateDetail != null) - message.stateDetail = String(object.stateDetail); - switch (object.errorCode) { - default: - if (typeof object.errorCode === "number") { - message.errorCode = object.errorCode; - break; - } - break; - case "ERROR_CODE_UNSPECIFIED": - case 0: - message.errorCode = 0; - break; - case "REVISION_FAILED": - case 1: - message.errorCode = 1; - break; - case "CLOUD_BUILD_PERMISSION_DENIED": - case 3: - message.errorCode = 3; - break; - case "DELETE_BUILD_API_FAILED": - case 5: - message.errorCode = 5; - break; - case "DELETE_BUILD_RUN_FAILED": - case 6: - message.errorCode = 6; - break; - case "BUCKET_CREATION_PERMISSION_DENIED": - case 7: - message.errorCode = 7; - break; - case "BUCKET_CREATION_FAILED": - case 8: - message.errorCode = 8; - break; - case "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": - case 10: - message.errorCode = 10; - break; - } - if (object.deleteResults != null) { - if (typeof object.deleteResults !== "object") - throw TypeError(".google.cloud.config.v1.Deployment.deleteResults: object expected"); - message.deleteResults = $root.google.cloud.config.v1.ApplyResults.fromObject(object.deleteResults); - } - if (object.deleteBuild != null) - message.deleteBuild = String(object.deleteBuild); - if (object.deleteLogs != null) - message.deleteLogs = String(object.deleteLogs); - if (object.tfErrors) { - if (!Array.isArray(object.tfErrors)) - throw TypeError(".google.cloud.config.v1.Deployment.tfErrors: array expected"); - message.tfErrors = []; - for (var i = 0; i < object.tfErrors.length; ++i) { - if (typeof object.tfErrors[i] !== "object") - throw TypeError(".google.cloud.config.v1.Deployment.tfErrors: object expected"); - message.tfErrors[i] = $root.google.cloud.config.v1.TerraformError.fromObject(object.tfErrors[i]); - } - } - if (object.errorLogs != null) - message.errorLogs = String(object.errorLogs); - if (object.artifactsGcsBucket != null) - message.artifactsGcsBucket = String(object.artifactsGcsBucket); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.importExistingResources != null) - message.importExistingResources = Boolean(object.importExistingResources); - if (object.workerPool != null) - message.workerPool = String(object.workerPool); - switch (object.lockState) { - default: - if (typeof object.lockState === "number") { - message.lockState = object.lockState; - break; - } - break; - case "LOCK_STATE_UNSPECIFIED": - case 0: - message.lockState = 0; - break; - case "LOCKED": - case 1: - message.lockState = 1; - break; - case "UNLOCKED": - case 2: - message.lockState = 2; - break; - case "LOCKING": - case 3: - message.lockState = 3; - break; - case "UNLOCKING": - case 4: - message.lockState = 4; - break; - case "LOCK_FAILED": - case 5: - message.lockState = 5; - break; - case "UNLOCK_FAILED": - case 6: - message.lockState = 6; - break; - } - if (object.tfVersionConstraint != null) - message.tfVersionConstraint = String(object.tfVersionConstraint); - if (object.tfVersion != null) - message.tfVersion = String(object.tfVersion); - switch (object.quotaValidation) { - default: - if (typeof object.quotaValidation === "number") { - message.quotaValidation = object.quotaValidation; - break; - } - break; - case "QUOTA_VALIDATION_UNSPECIFIED": - case 0: - message.quotaValidation = 0; - break; - case "ENABLED": - case 1: - message.quotaValidation = 1; - break; - case "ENFORCED": - case 2: - message.quotaValidation = 2; - break; - } - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.config.v1.Deployment.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - if (object.providerConfig != null) { - if (typeof object.providerConfig !== "object") - throw TypeError(".google.cloud.config.v1.Deployment.providerConfig: object expected"); - message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.fromObject(object.providerConfig); - } - return message; - }; - - /** - * Creates a plain object from a Deployment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.Deployment - * @static - * @param {google.cloud.config.v1.Deployment} message Deployment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Deployment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tfErrors = []; - if (options.objects || options.defaults) { - object.labels = {}; - object.annotations = {}; - } - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.latestRevision = ""; - object.deleteResults = null; - object.stateDetail = ""; - object.errorCode = options.enums === String ? "ERROR_CODE_UNSPECIFIED" : 0; - object.deleteBuild = ""; - object.deleteLogs = ""; - object.errorLogs = ""; - object.lockState = options.enums === String ? "LOCK_STATE_UNSPECIFIED" : 0; - object.tfVersion = ""; - object.quotaValidation = options.enums === String ? "QUOTA_VALIDATION_UNSPECIFIED" : 0; - object.providerConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.config.v1.Deployment.State[message.state] === undefined ? message.state : $root.google.cloud.config.v1.Deployment.State[message.state] : message.state; - if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { - object.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.toObject(message.terraformBlueprint, options); - if (options.oneofs) - object.blueprint = "terraformBlueprint"; - } - if (message.latestRevision != null && message.hasOwnProperty("latestRevision")) - object.latestRevision = message.latestRevision; - if (message.deleteResults != null && message.hasOwnProperty("deleteResults")) - object.deleteResults = $root.google.cloud.config.v1.ApplyResults.toObject(message.deleteResults, options); - if (message.stateDetail != null && message.hasOwnProperty("stateDetail")) - object.stateDetail = message.stateDetail; - if (message.errorCode != null && message.hasOwnProperty("errorCode")) - object.errorCode = options.enums === String ? $root.google.cloud.config.v1.Deployment.ErrorCode[message.errorCode] === undefined ? message.errorCode : $root.google.cloud.config.v1.Deployment.ErrorCode[message.errorCode] : message.errorCode; - if (message.deleteBuild != null && message.hasOwnProperty("deleteBuild")) - object.deleteBuild = message.deleteBuild; - if (message.deleteLogs != null && message.hasOwnProperty("deleteLogs")) - object.deleteLogs = message.deleteLogs; - if (message.tfErrors && message.tfErrors.length) { - object.tfErrors = []; - for (var j = 0; j < message.tfErrors.length; ++j) - object.tfErrors[j] = $root.google.cloud.config.v1.TerraformError.toObject(message.tfErrors[j], options); - } - if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) - object.errorLogs = message.errorLogs; - if (message.artifactsGcsBucket != null && message.hasOwnProperty("artifactsGcsBucket")) { - object.artifactsGcsBucket = message.artifactsGcsBucket; - if (options.oneofs) - object._artifactsGcsBucket = "artifactsGcsBucket"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { - object.serviceAccount = message.serviceAccount; - if (options.oneofs) - object._serviceAccount = "serviceAccount"; - } - if (message.importExistingResources != null && message.hasOwnProperty("importExistingResources")) { - object.importExistingResources = message.importExistingResources; - if (options.oneofs) - object._importExistingResources = "importExistingResources"; - } - if (message.workerPool != null && message.hasOwnProperty("workerPool")) { - object.workerPool = message.workerPool; - if (options.oneofs) - object._workerPool = "workerPool"; - } - if (message.lockState != null && message.hasOwnProperty("lockState")) - object.lockState = options.enums === String ? $root.google.cloud.config.v1.Deployment.LockState[message.lockState] === undefined ? message.lockState : $root.google.cloud.config.v1.Deployment.LockState[message.lockState] : message.lockState; - if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) { - object.tfVersionConstraint = message.tfVersionConstraint; - if (options.oneofs) - object._tfVersionConstraint = "tfVersionConstraint"; - } - if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) - object.tfVersion = message.tfVersion; - if (message.quotaValidation != null && message.hasOwnProperty("quotaValidation")) - object.quotaValidation = options.enums === String ? $root.google.cloud.config.v1.QuotaValidation[message.quotaValidation] === undefined ? message.quotaValidation : $root.google.cloud.config.v1.QuotaValidation[message.quotaValidation] : message.quotaValidation; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; - } - if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) - object.providerConfig = $root.google.cloud.config.v1.ProviderConfig.toObject(message.providerConfig, options); - return object; - }; - - /** - * Converts this Deployment to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.Deployment - * @instance - * @returns {Object.} JSON object - */ - Deployment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Deployment - * @function getTypeUrl - * @memberof google.cloud.config.v1.Deployment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Deployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.Deployment"; - }; - - /** - * State enum. - * @name google.cloud.config.v1.Deployment.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} UPDATING=3 UPDATING value - * @property {number} DELETING=4 DELETING value - * @property {number} FAILED=5 FAILED value - * @property {number} SUSPENDED=6 SUSPENDED value - * @property {number} DELETED=7 DELETED value - */ - Deployment.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "DELETING"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[6] = "SUSPENDED"] = 6; - values[valuesById[7] = "DELETED"] = 7; - return values; - })(); - - /** - * ErrorCode enum. - * @name google.cloud.config.v1.Deployment.ErrorCode - * @enum {number} - * @property {number} ERROR_CODE_UNSPECIFIED=0 ERROR_CODE_UNSPECIFIED value - * @property {number} REVISION_FAILED=1 REVISION_FAILED value - * @property {number} CLOUD_BUILD_PERMISSION_DENIED=3 CLOUD_BUILD_PERMISSION_DENIED value - * @property {number} DELETE_BUILD_API_FAILED=5 DELETE_BUILD_API_FAILED value - * @property {number} DELETE_BUILD_RUN_FAILED=6 DELETE_BUILD_RUN_FAILED value - * @property {number} BUCKET_CREATION_PERMISSION_DENIED=7 BUCKET_CREATION_PERMISSION_DENIED value - * @property {number} BUCKET_CREATION_FAILED=8 BUCKET_CREATION_FAILED value - * @property {number} EXTERNAL_VALUE_SOURCE_IMPORT_FAILED=10 EXTERNAL_VALUE_SOURCE_IMPORT_FAILED value - */ - Deployment.ErrorCode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ERROR_CODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "REVISION_FAILED"] = 1; - values[valuesById[3] = "CLOUD_BUILD_PERMISSION_DENIED"] = 3; - values[valuesById[5] = "DELETE_BUILD_API_FAILED"] = 5; - values[valuesById[6] = "DELETE_BUILD_RUN_FAILED"] = 6; - values[valuesById[7] = "BUCKET_CREATION_PERMISSION_DENIED"] = 7; - values[valuesById[8] = "BUCKET_CREATION_FAILED"] = 8; - values[valuesById[10] = "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED"] = 10; - return values; - })(); - - /** - * LockState enum. - * @name google.cloud.config.v1.Deployment.LockState - * @enum {number} - * @property {number} LOCK_STATE_UNSPECIFIED=0 LOCK_STATE_UNSPECIFIED value - * @property {number} LOCKED=1 LOCKED value - * @property {number} UNLOCKED=2 UNLOCKED value - * @property {number} LOCKING=3 LOCKING value - * @property {number} UNLOCKING=4 UNLOCKING value - * @property {number} LOCK_FAILED=5 LOCK_FAILED value - * @property {number} UNLOCK_FAILED=6 UNLOCK_FAILED value - */ - Deployment.LockState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOCK_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LOCKED"] = 1; - values[valuesById[2] = "UNLOCKED"] = 2; - values[valuesById[3] = "LOCKING"] = 3; - values[valuesById[4] = "UNLOCKING"] = 4; - values[valuesById[5] = "LOCK_FAILED"] = 5; - values[valuesById[6] = "UNLOCK_FAILED"] = 6; - return values; - })(); - - return Deployment; - })(); - - v1.TerraformBlueprint = (function() { - - /** - * Properties of a TerraformBlueprint. - * @memberof google.cloud.config.v1 - * @interface ITerraformBlueprint - * @property {string|null} [gcsSource] TerraformBlueprint gcsSource - * @property {google.cloud.config.v1.IGitSource|null} [gitSource] TerraformBlueprint gitSource - * @property {Object.|null} [inputValues] TerraformBlueprint inputValues - */ - - /** - * Constructs a new TerraformBlueprint. - * @memberof google.cloud.config.v1 - * @classdesc Represents a TerraformBlueprint. - * @implements ITerraformBlueprint - * @constructor - * @param {google.cloud.config.v1.ITerraformBlueprint=} [properties] Properties to set - */ - function TerraformBlueprint(properties) { - this.inputValues = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TerraformBlueprint gcsSource. - * @member {string|null|undefined} gcsSource - * @memberof google.cloud.config.v1.TerraformBlueprint - * @instance - */ - TerraformBlueprint.prototype.gcsSource = null; - - /** - * TerraformBlueprint gitSource. - * @member {google.cloud.config.v1.IGitSource|null|undefined} gitSource - * @memberof google.cloud.config.v1.TerraformBlueprint - * @instance - */ - TerraformBlueprint.prototype.gitSource = null; - - /** - * TerraformBlueprint inputValues. - * @member {Object.} inputValues - * @memberof google.cloud.config.v1.TerraformBlueprint - * @instance - */ - TerraformBlueprint.prototype.inputValues = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TerraformBlueprint source. - * @member {"gcsSource"|"gitSource"|undefined} source - * @memberof google.cloud.config.v1.TerraformBlueprint - * @instance - */ - Object.defineProperty(TerraformBlueprint.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource", "gitSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TerraformBlueprint instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.TerraformBlueprint - * @static - * @param {google.cloud.config.v1.ITerraformBlueprint=} [properties] Properties to set - * @returns {google.cloud.config.v1.TerraformBlueprint} TerraformBlueprint instance - */ - TerraformBlueprint.create = function create(properties) { - return new TerraformBlueprint(properties); - }; - - /** - * Encodes the specified TerraformBlueprint message. Does not implicitly {@link google.cloud.config.v1.TerraformBlueprint.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.TerraformBlueprint - * @static - * @param {google.cloud.config.v1.ITerraformBlueprint} message TerraformBlueprint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TerraformBlueprint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsSource); - if (message.gitSource != null && Object.hasOwnProperty.call(message, "gitSource")) - $root.google.cloud.config.v1.GitSource.encode(message.gitSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inputValues != null && Object.hasOwnProperty.call(message, "inputValues")) - for (var keys = Object.keys(message.inputValues), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.config.v1.TerraformVariable.encode(message.inputValues[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified TerraformBlueprint message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformBlueprint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.TerraformBlueprint - * @static - * @param {google.cloud.config.v1.ITerraformBlueprint} message TerraformBlueprint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TerraformBlueprint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TerraformBlueprint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.TerraformBlueprint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.TerraformBlueprint} TerraformBlueprint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TerraformBlueprint.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.TerraformBlueprint(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.gcsSource = reader.string(); - break; - } - case 2: { - message.gitSource = $root.google.cloud.config.v1.GitSource.decode(reader, reader.uint32()); - break; - } - case 4: { - if (message.inputValues === $util.emptyObject) - message.inputValues = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.config.v1.TerraformVariable.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.inputValues[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TerraformBlueprint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.TerraformBlueprint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.TerraformBlueprint} TerraformBlueprint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TerraformBlueprint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TerraformBlueprint message. - * @function verify - * @memberof google.cloud.config.v1.TerraformBlueprint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TerraformBlueprint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - if (!$util.isString(message.gcsSource)) - return "gcsSource: string expected"; - } - if (message.gitSource != null && message.hasOwnProperty("gitSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.config.v1.GitSource.verify(message.gitSource); - if (error) - return "gitSource." + error; - } - } - if (message.inputValues != null && message.hasOwnProperty("inputValues")) { - if (!$util.isObject(message.inputValues)) - return "inputValues: object expected"; - var key = Object.keys(message.inputValues); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.config.v1.TerraformVariable.verify(message.inputValues[key[i]]); - if (error) - return "inputValues." + error; - } - } - return null; - }; - - /** - * Creates a TerraformBlueprint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.TerraformBlueprint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.TerraformBlueprint} TerraformBlueprint - */ - TerraformBlueprint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.TerraformBlueprint) - return object; - var message = new $root.google.cloud.config.v1.TerraformBlueprint(); - if (object.gcsSource != null) - message.gcsSource = String(object.gcsSource); - if (object.gitSource != null) { - if (typeof object.gitSource !== "object") - throw TypeError(".google.cloud.config.v1.TerraformBlueprint.gitSource: object expected"); - message.gitSource = $root.google.cloud.config.v1.GitSource.fromObject(object.gitSource); - } - if (object.inputValues) { - if (typeof object.inputValues !== "object") - throw TypeError(".google.cloud.config.v1.TerraformBlueprint.inputValues: object expected"); - message.inputValues = {}; - for (var keys = Object.keys(object.inputValues), i = 0; i < keys.length; ++i) { - if (typeof object.inputValues[keys[i]] !== "object") - throw TypeError(".google.cloud.config.v1.TerraformBlueprint.inputValues: object expected"); - message.inputValues[keys[i]] = $root.google.cloud.config.v1.TerraformVariable.fromObject(object.inputValues[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a TerraformBlueprint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.TerraformBlueprint - * @static - * @param {google.cloud.config.v1.TerraformBlueprint} message TerraformBlueprint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TerraformBlueprint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.inputValues = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = message.gcsSource; - if (options.oneofs) - object.source = "gcsSource"; - } - if (message.gitSource != null && message.hasOwnProperty("gitSource")) { - object.gitSource = $root.google.cloud.config.v1.GitSource.toObject(message.gitSource, options); - if (options.oneofs) - object.source = "gitSource"; - } - var keys2; - if (message.inputValues && (keys2 = Object.keys(message.inputValues)).length) { - object.inputValues = {}; - for (var j = 0; j < keys2.length; ++j) - object.inputValues[keys2[j]] = $root.google.cloud.config.v1.TerraformVariable.toObject(message.inputValues[keys2[j]], options); - } - return object; - }; - - /** - * Converts this TerraformBlueprint to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.TerraformBlueprint - * @instance - * @returns {Object.} JSON object - */ - TerraformBlueprint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TerraformBlueprint - * @function getTypeUrl - * @memberof google.cloud.config.v1.TerraformBlueprint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TerraformBlueprint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.TerraformBlueprint"; - }; - - return TerraformBlueprint; - })(); - - v1.TerraformVariable = (function() { - - /** - * Properties of a TerraformVariable. - * @memberof google.cloud.config.v1 - * @interface ITerraformVariable - * @property {google.protobuf.IValue|null} [inputValue] TerraformVariable inputValue - */ - - /** - * Constructs a new TerraformVariable. - * @memberof google.cloud.config.v1 - * @classdesc Represents a TerraformVariable. - * @implements ITerraformVariable - * @constructor - * @param {google.cloud.config.v1.ITerraformVariable=} [properties] Properties to set - */ - function TerraformVariable(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TerraformVariable inputValue. - * @member {google.protobuf.IValue|null|undefined} inputValue - * @memberof google.cloud.config.v1.TerraformVariable - * @instance - */ - TerraformVariable.prototype.inputValue = null; - - /** - * Creates a new TerraformVariable instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.TerraformVariable - * @static - * @param {google.cloud.config.v1.ITerraformVariable=} [properties] Properties to set - * @returns {google.cloud.config.v1.TerraformVariable} TerraformVariable instance - */ - TerraformVariable.create = function create(properties) { - return new TerraformVariable(properties); - }; - - /** - * Encodes the specified TerraformVariable message. Does not implicitly {@link google.cloud.config.v1.TerraformVariable.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.TerraformVariable - * @static - * @param {google.cloud.config.v1.ITerraformVariable} message TerraformVariable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TerraformVariable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputValue != null && Object.hasOwnProperty.call(message, "inputValue")) - $root.google.protobuf.Value.encode(message.inputValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TerraformVariable message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformVariable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.TerraformVariable - * @static - * @param {google.cloud.config.v1.ITerraformVariable} message TerraformVariable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TerraformVariable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TerraformVariable message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.TerraformVariable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.TerraformVariable} TerraformVariable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TerraformVariable.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.TerraformVariable(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 5: { - message.inputValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TerraformVariable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.TerraformVariable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.TerraformVariable} TerraformVariable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TerraformVariable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TerraformVariable message. - * @function verify - * @memberof google.cloud.config.v1.TerraformVariable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TerraformVariable.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputValue != null && message.hasOwnProperty("inputValue")) { - var error = $root.google.protobuf.Value.verify(message.inputValue); - if (error) - return "inputValue." + error; - } - return null; - }; - - /** - * Creates a TerraformVariable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.TerraformVariable - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.TerraformVariable} TerraformVariable - */ - TerraformVariable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.TerraformVariable) - return object; - var message = new $root.google.cloud.config.v1.TerraformVariable(); - if (object.inputValue != null) { - if (typeof object.inputValue !== "object") - throw TypeError(".google.cloud.config.v1.TerraformVariable.inputValue: object expected"); - message.inputValue = $root.google.protobuf.Value.fromObject(object.inputValue); - } - return message; - }; - - /** - * Creates a plain object from a TerraformVariable message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.TerraformVariable - * @static - * @param {google.cloud.config.v1.TerraformVariable} message TerraformVariable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TerraformVariable.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.inputValue = null; - if (message.inputValue != null && message.hasOwnProperty("inputValue")) - object.inputValue = $root.google.protobuf.Value.toObject(message.inputValue, options); - return object; - }; - - /** - * Converts this TerraformVariable to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.TerraformVariable - * @instance - * @returns {Object.} JSON object - */ - TerraformVariable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TerraformVariable - * @function getTypeUrl - * @memberof google.cloud.config.v1.TerraformVariable - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TerraformVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.TerraformVariable"; - }; - - return TerraformVariable; - })(); - - v1.ApplyResults = (function() { - - /** - * Properties of an ApplyResults. - * @memberof google.cloud.config.v1 - * @interface IApplyResults - * @property {string|null} [content] ApplyResults content - * @property {string|null} [artifacts] ApplyResults artifacts - * @property {Object.|null} [outputs] ApplyResults outputs - */ - - /** - * Constructs a new ApplyResults. - * @memberof google.cloud.config.v1 - * @classdesc Represents an ApplyResults. - * @implements IApplyResults - * @constructor - * @param {google.cloud.config.v1.IApplyResults=} [properties] Properties to set - */ - function ApplyResults(properties) { - this.outputs = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ApplyResults content. - * @member {string} content - * @memberof google.cloud.config.v1.ApplyResults - * @instance - */ - ApplyResults.prototype.content = ""; - - /** - * ApplyResults artifacts. - * @member {string} artifacts - * @memberof google.cloud.config.v1.ApplyResults - * @instance - */ - ApplyResults.prototype.artifacts = ""; - - /** - * ApplyResults outputs. - * @member {Object.} outputs - * @memberof google.cloud.config.v1.ApplyResults - * @instance - */ - ApplyResults.prototype.outputs = $util.emptyObject; - - /** - * Creates a new ApplyResults instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ApplyResults - * @static - * @param {google.cloud.config.v1.IApplyResults=} [properties] Properties to set - * @returns {google.cloud.config.v1.ApplyResults} ApplyResults instance - */ - ApplyResults.create = function create(properties) { - return new ApplyResults(properties); - }; - - /** - * Encodes the specified ApplyResults message. Does not implicitly {@link google.cloud.config.v1.ApplyResults.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ApplyResults - * @static - * @param {google.cloud.config.v1.IApplyResults} message ApplyResults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ApplyResults.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.artifacts != null && Object.hasOwnProperty.call(message, "artifacts")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifacts); - if (message.outputs != null && Object.hasOwnProperty.call(message, "outputs")) - for (var keys = Object.keys(message.outputs), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.config.v1.TerraformOutput.encode(message.outputs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ApplyResults message, length delimited. Does not implicitly {@link google.cloud.config.v1.ApplyResults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ApplyResults - * @static - * @param {google.cloud.config.v1.IApplyResults} message ApplyResults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ApplyResults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ApplyResults message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ApplyResults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ApplyResults} ApplyResults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ApplyResults.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ApplyResults(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.content = reader.string(); - break; - } - case 2: { - message.artifacts = reader.string(); - break; - } - case 3: { - if (message.outputs === $util.emptyObject) - message.outputs = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.config.v1.TerraformOutput.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.outputs[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ApplyResults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ApplyResults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ApplyResults} ApplyResults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ApplyResults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ApplyResults message. - * @function verify - * @memberof google.cloud.config.v1.ApplyResults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ApplyResults.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.artifacts != null && message.hasOwnProperty("artifacts")) - if (!$util.isString(message.artifacts)) - return "artifacts: string expected"; - if (message.outputs != null && message.hasOwnProperty("outputs")) { - if (!$util.isObject(message.outputs)) - return "outputs: object expected"; - var key = Object.keys(message.outputs); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.config.v1.TerraformOutput.verify(message.outputs[key[i]]); - if (error) - return "outputs." + error; - } - } - return null; - }; - - /** - * Creates an ApplyResults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ApplyResults - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ApplyResults} ApplyResults - */ - ApplyResults.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ApplyResults) - return object; - var message = new $root.google.cloud.config.v1.ApplyResults(); - if (object.content != null) - message.content = String(object.content); - if (object.artifacts != null) - message.artifacts = String(object.artifacts); - if (object.outputs) { - if (typeof object.outputs !== "object") - throw TypeError(".google.cloud.config.v1.ApplyResults.outputs: object expected"); - message.outputs = {}; - for (var keys = Object.keys(object.outputs), i = 0; i < keys.length; ++i) { - if (typeof object.outputs[keys[i]] !== "object") - throw TypeError(".google.cloud.config.v1.ApplyResults.outputs: object expected"); - message.outputs[keys[i]] = $root.google.cloud.config.v1.TerraformOutput.fromObject(object.outputs[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from an ApplyResults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ApplyResults - * @static - * @param {google.cloud.config.v1.ApplyResults} message ApplyResults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ApplyResults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.outputs = {}; - if (options.defaults) { - object.content = ""; - object.artifacts = ""; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.artifacts != null && message.hasOwnProperty("artifacts")) - object.artifacts = message.artifacts; - var keys2; - if (message.outputs && (keys2 = Object.keys(message.outputs)).length) { - object.outputs = {}; - for (var j = 0; j < keys2.length; ++j) - object.outputs[keys2[j]] = $root.google.cloud.config.v1.TerraformOutput.toObject(message.outputs[keys2[j]], options); - } - return object; - }; - - /** - * Converts this ApplyResults to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ApplyResults - * @instance - * @returns {Object.} JSON object - */ - ApplyResults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ApplyResults - * @function getTypeUrl - * @memberof google.cloud.config.v1.ApplyResults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ApplyResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ApplyResults"; - }; - - return ApplyResults; - })(); - - v1.TerraformOutput = (function() { - - /** - * Properties of a TerraformOutput. - * @memberof google.cloud.config.v1 - * @interface ITerraformOutput - * @property {boolean|null} [sensitive] TerraformOutput sensitive - * @property {google.protobuf.IValue|null} [value] TerraformOutput value - */ - - /** - * Constructs a new TerraformOutput. - * @memberof google.cloud.config.v1 - * @classdesc Represents a TerraformOutput. - * @implements ITerraformOutput - * @constructor - * @param {google.cloud.config.v1.ITerraformOutput=} [properties] Properties to set - */ - function TerraformOutput(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TerraformOutput sensitive. - * @member {boolean} sensitive - * @memberof google.cloud.config.v1.TerraformOutput - * @instance - */ - TerraformOutput.prototype.sensitive = false; - - /** - * TerraformOutput value. - * @member {google.protobuf.IValue|null|undefined} value - * @memberof google.cloud.config.v1.TerraformOutput - * @instance - */ - TerraformOutput.prototype.value = null; - - /** - * Creates a new TerraformOutput instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.TerraformOutput - * @static - * @param {google.cloud.config.v1.ITerraformOutput=} [properties] Properties to set - * @returns {google.cloud.config.v1.TerraformOutput} TerraformOutput instance - */ - TerraformOutput.create = function create(properties) { - return new TerraformOutput(properties); - }; - - /** - * Encodes the specified TerraformOutput message. Does not implicitly {@link google.cloud.config.v1.TerraformOutput.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.TerraformOutput - * @static - * @param {google.cloud.config.v1.ITerraformOutput} message TerraformOutput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TerraformOutput.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sensitive != null && Object.hasOwnProperty.call(message, "sensitive")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.sensitive); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TerraformOutput message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformOutput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.TerraformOutput - * @static - * @param {google.cloud.config.v1.ITerraformOutput} message TerraformOutput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TerraformOutput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TerraformOutput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.TerraformOutput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.TerraformOutput} TerraformOutput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TerraformOutput.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.TerraformOutput(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.sensitive = reader.bool(); - break; - } - case 2: { - message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TerraformOutput message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.TerraformOutput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.TerraformOutput} TerraformOutput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TerraformOutput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TerraformOutput message. - * @function verify - * @memberof google.cloud.config.v1.TerraformOutput - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TerraformOutput.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sensitive != null && message.hasOwnProperty("sensitive")) - if (typeof message.sensitive !== "boolean") - return "sensitive: boolean expected"; - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.protobuf.Value.verify(message.value); - if (error) - return "value." + error; - } - return null; - }; - - /** - * Creates a TerraformOutput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.TerraformOutput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.TerraformOutput} TerraformOutput - */ - TerraformOutput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.TerraformOutput) - return object; - var message = new $root.google.cloud.config.v1.TerraformOutput(); - if (object.sensitive != null) - message.sensitive = Boolean(object.sensitive); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.config.v1.TerraformOutput.value: object expected"); - message.value = $root.google.protobuf.Value.fromObject(object.value); - } - return message; - }; - - /** - * Creates a plain object from a TerraformOutput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.TerraformOutput - * @static - * @param {google.cloud.config.v1.TerraformOutput} message TerraformOutput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TerraformOutput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sensitive = false; - object.value = null; - } - if (message.sensitive != null && message.hasOwnProperty("sensitive")) - object.sensitive = message.sensitive; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.protobuf.Value.toObject(message.value, options); - return object; - }; - - /** - * Converts this TerraformOutput to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.TerraformOutput - * @instance - * @returns {Object.} JSON object - */ - TerraformOutput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TerraformOutput - * @function getTypeUrl - * @memberof google.cloud.config.v1.TerraformOutput - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TerraformOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.TerraformOutput"; - }; - - return TerraformOutput; - })(); - - v1.ListDeploymentsRequest = (function() { - - /** - * Properties of a ListDeploymentsRequest. - * @memberof google.cloud.config.v1 - * @interface IListDeploymentsRequest - * @property {string|null} [parent] ListDeploymentsRequest parent - * @property {number|null} [pageSize] ListDeploymentsRequest pageSize - * @property {string|null} [pageToken] ListDeploymentsRequest pageToken - * @property {string|null} [filter] ListDeploymentsRequest filter - * @property {string|null} [orderBy] ListDeploymentsRequest orderBy - */ - - /** - * Constructs a new ListDeploymentsRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListDeploymentsRequest. - * @implements IListDeploymentsRequest - * @constructor - * @param {google.cloud.config.v1.IListDeploymentsRequest=} [properties] Properties to set - */ - function ListDeploymentsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDeploymentsRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @instance - */ - ListDeploymentsRequest.prototype.parent = ""; - - /** - * ListDeploymentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @instance - */ - ListDeploymentsRequest.prototype.pageSize = 0; - - /** - * ListDeploymentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @instance - */ - ListDeploymentsRequest.prototype.pageToken = ""; - - /** - * ListDeploymentsRequest filter. - * @member {string} filter - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @instance - */ - ListDeploymentsRequest.prototype.filter = ""; - - /** - * ListDeploymentsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @instance - */ - ListDeploymentsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListDeploymentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @static - * @param {google.cloud.config.v1.IListDeploymentsRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListDeploymentsRequest} ListDeploymentsRequest instance - */ - ListDeploymentsRequest.create = function create(properties) { - return new ListDeploymentsRequest(properties); - }; - - /** - * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @static - * @param {google.cloud.config.v1.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDeploymentsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @static - * @param {google.cloud.config.v1.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListDeploymentsRequest} ListDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDeploymentsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListDeploymentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListDeploymentsRequest} ListDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDeploymentsRequest message. - * @function verify - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDeploymentsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListDeploymentsRequest} ListDeploymentsRequest - */ - ListDeploymentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListDeploymentsRequest) - return object; - var message = new $root.google.cloud.config.v1.ListDeploymentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @static - * @param {google.cloud.config.v1.ListDeploymentsRequest} message ListDeploymentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDeploymentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListDeploymentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @instance - * @returns {Object.} JSON object - */ - ListDeploymentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDeploymentsRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListDeploymentsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListDeploymentsRequest"; - }; - - return ListDeploymentsRequest; - })(); - - v1.ListDeploymentsResponse = (function() { - - /** - * Properties of a ListDeploymentsResponse. - * @memberof google.cloud.config.v1 - * @interface IListDeploymentsResponse - * @property {Array.|null} [deployments] ListDeploymentsResponse deployments - * @property {string|null} [nextPageToken] ListDeploymentsResponse nextPageToken - * @property {Array.|null} [unreachable] ListDeploymentsResponse unreachable - */ - - /** - * Constructs a new ListDeploymentsResponse. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListDeploymentsResponse. - * @implements IListDeploymentsResponse - * @constructor - * @param {google.cloud.config.v1.IListDeploymentsResponse=} [properties] Properties to set - */ - function ListDeploymentsResponse(properties) { - this.deployments = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDeploymentsResponse deployments. - * @member {Array.} deployments - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @instance - */ - ListDeploymentsResponse.prototype.deployments = $util.emptyArray; - - /** - * ListDeploymentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @instance - */ - ListDeploymentsResponse.prototype.nextPageToken = ""; - - /** - * ListDeploymentsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @instance - */ - ListDeploymentsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListDeploymentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @static - * @param {google.cloud.config.v1.IListDeploymentsResponse=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListDeploymentsResponse} ListDeploymentsResponse instance - */ - ListDeploymentsResponse.create = function create(properties) { - return new ListDeploymentsResponse(properties); - }; - - /** - * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @static - * @param {google.cloud.config.v1.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDeploymentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deployments != null && message.deployments.length) - for (var i = 0; i < message.deployments.length; ++i) - $root.google.cloud.config.v1.Deployment.encode(message.deployments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListDeploymentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @static - * @param {google.cloud.config.v1.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListDeploymentsResponse} ListDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDeploymentsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListDeploymentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.deployments && message.deployments.length)) - message.deployments = []; - message.deployments.push($root.google.cloud.config.v1.Deployment.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListDeploymentsResponse} ListDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDeploymentsResponse message. - * @function verify - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDeploymentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deployments != null && message.hasOwnProperty("deployments")) { - if (!Array.isArray(message.deployments)) - return "deployments: array expected"; - for (var i = 0; i < message.deployments.length; ++i) { - var error = $root.google.cloud.config.v1.Deployment.verify(message.deployments[i]); - if (error) - return "deployments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListDeploymentsResponse} ListDeploymentsResponse - */ - ListDeploymentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListDeploymentsResponse) - return object; - var message = new $root.google.cloud.config.v1.ListDeploymentsResponse(); - if (object.deployments) { - if (!Array.isArray(object.deployments)) - throw TypeError(".google.cloud.config.v1.ListDeploymentsResponse.deployments: array expected"); - message.deployments = []; - for (var i = 0; i < object.deployments.length; ++i) { - if (typeof object.deployments[i] !== "object") - throw TypeError(".google.cloud.config.v1.ListDeploymentsResponse.deployments: object expected"); - message.deployments[i] = $root.google.cloud.config.v1.Deployment.fromObject(object.deployments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.config.v1.ListDeploymentsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @static - * @param {google.cloud.config.v1.ListDeploymentsResponse} message ListDeploymentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDeploymentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.deployments = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.deployments && message.deployments.length) { - object.deployments = []; - for (var j = 0; j < message.deployments.length; ++j) - object.deployments[j] = $root.google.cloud.config.v1.Deployment.toObject(message.deployments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListDeploymentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @instance - * @returns {Object.} JSON object - */ - ListDeploymentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDeploymentsResponse - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListDeploymentsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListDeploymentsResponse"; - }; - - return ListDeploymentsResponse; - })(); - - v1.GetDeploymentRequest = (function() { - - /** - * Properties of a GetDeploymentRequest. - * @memberof google.cloud.config.v1 - * @interface IGetDeploymentRequest - * @property {string|null} [name] GetDeploymentRequest name - */ - - /** - * Constructs a new GetDeploymentRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a GetDeploymentRequest. - * @implements IGetDeploymentRequest - * @constructor - * @param {google.cloud.config.v1.IGetDeploymentRequest=} [properties] Properties to set - */ - function GetDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.GetDeploymentRequest - * @instance - */ - GetDeploymentRequest.prototype.name = ""; - - /** - * Creates a new GetDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.GetDeploymentRequest - * @static - * @param {google.cloud.config.v1.IGetDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.GetDeploymentRequest} GetDeploymentRequest instance - */ - GetDeploymentRequest.create = function create(properties) { - return new GetDeploymentRequest(properties); - }; - - /** - * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.GetDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.GetDeploymentRequest - * @static - * @param {google.cloud.config.v1.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDeploymentRequest.encode = function encode(message, writer) { - 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 GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.GetDeploymentRequest - * @static - * @param {google.cloud.config.v1.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.GetDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.GetDeploymentRequest} GetDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDeploymentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.GetDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.GetDeploymentRequest} GetDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetDeploymentRequest message. - * @function verify - * @memberof google.cloud.config.v1.GetDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDeploymentRequest.verify = function verify(message) { - if (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 GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.GetDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.GetDeploymentRequest} GetDeploymentRequest - */ - GetDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.GetDeploymentRequest) - return object; - var message = new $root.google.cloud.config.v1.GetDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.GetDeploymentRequest - * @static - * @param {google.cloud.config.v1.GetDeploymentRequest} message GetDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDeploymentRequest.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 GetDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.GetDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - GetDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetDeploymentRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.GetDeploymentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.GetDeploymentRequest"; - }; - - return GetDeploymentRequest; - })(); - - v1.ListRevisionsRequest = (function() { - - /** - * Properties of a ListRevisionsRequest. - * @memberof google.cloud.config.v1 - * @interface IListRevisionsRequest - * @property {string|null} [parent] ListRevisionsRequest parent - * @property {number|null} [pageSize] ListRevisionsRequest pageSize - * @property {string|null} [pageToken] ListRevisionsRequest pageToken - * @property {string|null} [filter] ListRevisionsRequest filter - * @property {string|null} [orderBy] ListRevisionsRequest orderBy - */ - - /** - * Constructs a new ListRevisionsRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListRevisionsRequest. - * @implements IListRevisionsRequest - * @constructor - * @param {google.cloud.config.v1.IListRevisionsRequest=} [properties] Properties to set - */ - function ListRevisionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListRevisionsRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @instance - */ - ListRevisionsRequest.prototype.parent = ""; - - /** - * ListRevisionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @instance - */ - ListRevisionsRequest.prototype.pageSize = 0; - - /** - * ListRevisionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @instance - */ - ListRevisionsRequest.prototype.pageToken = ""; - - /** - * ListRevisionsRequest filter. - * @member {string} filter - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @instance - */ - ListRevisionsRequest.prototype.filter = ""; - - /** - * ListRevisionsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @instance - */ - ListRevisionsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListRevisionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @static - * @param {google.cloud.config.v1.IListRevisionsRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListRevisionsRequest} ListRevisionsRequest instance - */ - ListRevisionsRequest.create = function create(properties) { - return new ListRevisionsRequest(properties); - }; - - /** - * Encodes the specified ListRevisionsRequest message. Does not implicitly {@link google.cloud.config.v1.ListRevisionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @static - * @param {google.cloud.config.v1.IListRevisionsRequest} message ListRevisionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRevisionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListRevisionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @static - * @param {google.cloud.config.v1.IListRevisionsRequest} message ListRevisionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRevisionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListRevisionsRequest} ListRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRevisionsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListRevisionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRevisionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListRevisionsRequest} ListRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRevisionsRequest message. - * @function verify - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRevisionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListRevisionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListRevisionsRequest} ListRevisionsRequest - */ - ListRevisionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListRevisionsRequest) - return object; - var message = new $root.google.cloud.config.v1.ListRevisionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListRevisionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @static - * @param {google.cloud.config.v1.ListRevisionsRequest} message ListRevisionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRevisionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListRevisionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListRevisionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRevisionsRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListRevisionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRevisionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListRevisionsRequest"; - }; - - return ListRevisionsRequest; - })(); - - v1.ListRevisionsResponse = (function() { - - /** - * Properties of a ListRevisionsResponse. - * @memberof google.cloud.config.v1 - * @interface IListRevisionsResponse - * @property {Array.|null} [revisions] ListRevisionsResponse revisions - * @property {string|null} [nextPageToken] ListRevisionsResponse nextPageToken - * @property {Array.|null} [unreachable] ListRevisionsResponse unreachable - */ - - /** - * Constructs a new ListRevisionsResponse. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListRevisionsResponse. - * @implements IListRevisionsResponse - * @constructor - * @param {google.cloud.config.v1.IListRevisionsResponse=} [properties] Properties to set - */ - function ListRevisionsResponse(properties) { - this.revisions = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListRevisionsResponse revisions. - * @member {Array.} revisions - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @instance - */ - ListRevisionsResponse.prototype.revisions = $util.emptyArray; - - /** - * ListRevisionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @instance - */ - ListRevisionsResponse.prototype.nextPageToken = ""; - - /** - * ListRevisionsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @instance - */ - ListRevisionsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListRevisionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @static - * @param {google.cloud.config.v1.IListRevisionsResponse=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListRevisionsResponse} ListRevisionsResponse instance - */ - ListRevisionsResponse.create = function create(properties) { - return new ListRevisionsResponse(properties); - }; - - /** - * Encodes the specified ListRevisionsResponse message. Does not implicitly {@link google.cloud.config.v1.ListRevisionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @static - * @param {google.cloud.config.v1.IListRevisionsResponse} message ListRevisionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRevisionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.revisions != null && message.revisions.length) - for (var i = 0; i < message.revisions.length; ++i) - $root.google.cloud.config.v1.Revision.encode(message.revisions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListRevisionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @static - * @param {google.cloud.config.v1.IListRevisionsResponse} message ListRevisionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListRevisionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListRevisionsResponse} ListRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRevisionsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListRevisionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.revisions && message.revisions.length)) - message.revisions = []; - message.revisions.push($root.google.cloud.config.v1.Revision.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListRevisionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListRevisionsResponse} ListRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListRevisionsResponse message. - * @function verify - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListRevisionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.revisions != null && message.hasOwnProperty("revisions")) { - if (!Array.isArray(message.revisions)) - return "revisions: array expected"; - for (var i = 0; i < message.revisions.length; ++i) { - var error = $root.google.cloud.config.v1.Revision.verify(message.revisions[i]); - if (error) - return "revisions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListRevisionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListRevisionsResponse} ListRevisionsResponse - */ - ListRevisionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListRevisionsResponse) - return object; - var message = new $root.google.cloud.config.v1.ListRevisionsResponse(); - if (object.revisions) { - if (!Array.isArray(object.revisions)) - throw TypeError(".google.cloud.config.v1.ListRevisionsResponse.revisions: array expected"); - message.revisions = []; - for (var i = 0; i < object.revisions.length; ++i) { - if (typeof object.revisions[i] !== "object") - throw TypeError(".google.cloud.config.v1.ListRevisionsResponse.revisions: object expected"); - message.revisions[i] = $root.google.cloud.config.v1.Revision.fromObject(object.revisions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.config.v1.ListRevisionsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListRevisionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @static - * @param {google.cloud.config.v1.ListRevisionsResponse} message ListRevisionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListRevisionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.revisions = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.revisions && message.revisions.length) { - object.revisions = []; - for (var j = 0; j < message.revisions.length; ++j) - object.revisions[j] = $root.google.cloud.config.v1.Revision.toObject(message.revisions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListRevisionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListRevisionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListRevisionsResponse - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListRevisionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListRevisionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListRevisionsResponse"; - }; - - return ListRevisionsResponse; - })(); - - v1.GetRevisionRequest = (function() { - - /** - * Properties of a GetRevisionRequest. - * @memberof google.cloud.config.v1 - * @interface IGetRevisionRequest - * @property {string|null} [name] GetRevisionRequest name - */ - - /** - * Constructs a new GetRevisionRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a GetRevisionRequest. - * @implements IGetRevisionRequest - * @constructor - * @param {google.cloud.config.v1.IGetRevisionRequest=} [properties] Properties to set - */ - function GetRevisionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetRevisionRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.GetRevisionRequest - * @instance - */ - GetRevisionRequest.prototype.name = ""; - - /** - * Creates a new GetRevisionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.GetRevisionRequest - * @static - * @param {google.cloud.config.v1.IGetRevisionRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.GetRevisionRequest} GetRevisionRequest instance - */ - GetRevisionRequest.create = function create(properties) { - return new GetRevisionRequest(properties); - }; - - /** - * Encodes the specified GetRevisionRequest message. Does not implicitly {@link google.cloud.config.v1.GetRevisionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.GetRevisionRequest - * @static - * @param {google.cloud.config.v1.IGetRevisionRequest} message GetRevisionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRevisionRequest.encode = function encode(message, writer) { - 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 GetRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetRevisionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.GetRevisionRequest - * @static - * @param {google.cloud.config.v1.IGetRevisionRequest} message GetRevisionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetRevisionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.GetRevisionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.GetRevisionRequest} GetRevisionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRevisionRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetRevisionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetRevisionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.GetRevisionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.GetRevisionRequest} GetRevisionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRevisionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetRevisionRequest message. - * @function verify - * @memberof google.cloud.config.v1.GetRevisionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetRevisionRequest.verify = function verify(message) { - if (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 GetRevisionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.GetRevisionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.GetRevisionRequest} GetRevisionRequest - */ - GetRevisionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.GetRevisionRequest) - return object; - var message = new $root.google.cloud.config.v1.GetRevisionRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetRevisionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.GetRevisionRequest - * @static - * @param {google.cloud.config.v1.GetRevisionRequest} message GetRevisionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetRevisionRequest.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 GetRevisionRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.GetRevisionRequest - * @instance - * @returns {Object.} JSON object - */ - GetRevisionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetRevisionRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.GetRevisionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.GetRevisionRequest"; - }; - - return GetRevisionRequest; - })(); - - v1.CreateDeploymentRequest = (function() { - - /** - * Properties of a CreateDeploymentRequest. - * @memberof google.cloud.config.v1 - * @interface ICreateDeploymentRequest - * @property {string|null} [parent] CreateDeploymentRequest parent - * @property {string|null} [deploymentId] CreateDeploymentRequest deploymentId - * @property {google.cloud.config.v1.IDeployment|null} [deployment] CreateDeploymentRequest deployment - * @property {string|null} [requestId] CreateDeploymentRequest requestId - */ - - /** - * Constructs a new CreateDeploymentRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a CreateDeploymentRequest. - * @implements ICreateDeploymentRequest - * @constructor - * @param {google.cloud.config.v1.ICreateDeploymentRequest=} [properties] Properties to set - */ - function CreateDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateDeploymentRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @instance - */ - CreateDeploymentRequest.prototype.parent = ""; - - /** - * CreateDeploymentRequest deploymentId. - * @member {string} deploymentId - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @instance - */ - CreateDeploymentRequest.prototype.deploymentId = ""; - - /** - * CreateDeploymentRequest deployment. - * @member {google.cloud.config.v1.IDeployment|null|undefined} deployment - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @instance - */ - CreateDeploymentRequest.prototype.deployment = null; - - /** - * CreateDeploymentRequest requestId. - * @member {string} requestId - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @instance - */ - CreateDeploymentRequest.prototype.requestId = ""; - - /** - * Creates a new CreateDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @static - * @param {google.cloud.config.v1.ICreateDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.CreateDeploymentRequest} CreateDeploymentRequest instance - */ - CreateDeploymentRequest.create = function create(properties) { - return new CreateDeploymentRequest(properties); - }; - - /** - * Encodes the specified CreateDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.CreateDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @static - * @param {google.cloud.config.v1.ICreateDeploymentRequest} message CreateDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDeploymentRequest.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.deploymentId != null && Object.hasOwnProperty.call(message, "deploymentId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.deploymentId); - if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) - $root.google.cloud.config.v1.Deployment.encode(message.deployment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified CreateDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.CreateDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @static - * @param {google.cloud.config.v1.ICreateDeploymentRequest} message CreateDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.CreateDeploymentRequest} CreateDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDeploymentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.CreateDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.deploymentId = reader.string(); - break; - } - case 3: { - message.deployment = $root.google.cloud.config.v1.Deployment.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.CreateDeploymentRequest} CreateDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateDeploymentRequest message. - * @function verify - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateDeploymentRequest.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.deploymentId != null && message.hasOwnProperty("deploymentId")) - if (!$util.isString(message.deploymentId)) - return "deploymentId: string expected"; - if (message.deployment != null && message.hasOwnProperty("deployment")) { - var error = $root.google.cloud.config.v1.Deployment.verify(message.deployment); - if (error) - return "deployment." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.CreateDeploymentRequest} CreateDeploymentRequest - */ - CreateDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.CreateDeploymentRequest) - return object; - var message = new $root.google.cloud.config.v1.CreateDeploymentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.deploymentId != null) - message.deploymentId = String(object.deploymentId); - if (object.deployment != null) { - if (typeof object.deployment !== "object") - throw TypeError(".google.cloud.config.v1.CreateDeploymentRequest.deployment: object expected"); - message.deployment = $root.google.cloud.config.v1.Deployment.fromObject(object.deployment); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @static - * @param {google.cloud.config.v1.CreateDeploymentRequest} message CreateDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateDeploymentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.deploymentId = ""; - object.deployment = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.deploymentId != null && message.hasOwnProperty("deploymentId")) - object.deploymentId = message.deploymentId; - if (message.deployment != null && message.hasOwnProperty("deployment")) - object.deployment = $root.google.cloud.config.v1.Deployment.toObject(message.deployment, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - CreateDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateDeploymentRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.CreateDeploymentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.CreateDeploymentRequest"; - }; - - return CreateDeploymentRequest; - })(); - - v1.UpdateDeploymentRequest = (function() { - - /** - * Properties of an UpdateDeploymentRequest. - * @memberof google.cloud.config.v1 - * @interface IUpdateDeploymentRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeploymentRequest updateMask - * @property {google.cloud.config.v1.IDeployment|null} [deployment] UpdateDeploymentRequest deployment - * @property {string|null} [requestId] UpdateDeploymentRequest requestId - */ - - /** - * Constructs a new UpdateDeploymentRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents an UpdateDeploymentRequest. - * @implements IUpdateDeploymentRequest - * @constructor - * @param {google.cloud.config.v1.IUpdateDeploymentRequest=} [properties] Properties to set - */ - function UpdateDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateDeploymentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @instance - */ - UpdateDeploymentRequest.prototype.updateMask = null; - - /** - * UpdateDeploymentRequest deployment. - * @member {google.cloud.config.v1.IDeployment|null|undefined} deployment - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @instance - */ - UpdateDeploymentRequest.prototype.deployment = null; - - /** - * UpdateDeploymentRequest requestId. - * @member {string} requestId - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @instance - */ - UpdateDeploymentRequest.prototype.requestId = ""; - - /** - * Creates a new UpdateDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @static - * @param {google.cloud.config.v1.IUpdateDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.UpdateDeploymentRequest} UpdateDeploymentRequest instance - */ - UpdateDeploymentRequest.create = function create(properties) { - return new UpdateDeploymentRequest(properties); - }; - - /** - * Encodes the specified UpdateDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.UpdateDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @static - * @param {google.cloud.config.v1.IUpdateDeploymentRequest} message UpdateDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDeploymentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) - $root.google.cloud.config.v1.Deployment.encode(message.deployment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified UpdateDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UpdateDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @static - * @param {google.cloud.config.v1.IUpdateDeploymentRequest} message UpdateDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.UpdateDeploymentRequest} UpdateDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDeploymentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.UpdateDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.deployment = $root.google.cloud.config.v1.Deployment.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.UpdateDeploymentRequest} UpdateDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateDeploymentRequest message. - * @function verify - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateDeploymentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.deployment != null && message.hasOwnProperty("deployment")) { - var error = $root.google.cloud.config.v1.Deployment.verify(message.deployment); - if (error) - return "deployment." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates an UpdateDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.UpdateDeploymentRequest} UpdateDeploymentRequest - */ - UpdateDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.UpdateDeploymentRequest) - return object; - var message = new $root.google.cloud.config.v1.UpdateDeploymentRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.config.v1.UpdateDeploymentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.deployment != null) { - if (typeof object.deployment !== "object") - throw TypeError(".google.cloud.config.v1.UpdateDeploymentRequest.deployment: object expected"); - message.deployment = $root.google.cloud.config.v1.Deployment.fromObject(object.deployment); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from an UpdateDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @static - * @param {google.cloud.config.v1.UpdateDeploymentRequest} message UpdateDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDeploymentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.deployment = null; - object.requestId = ""; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.deployment != null && message.hasOwnProperty("deployment")) - object.deployment = $root.google.cloud.config.v1.Deployment.toObject(message.deployment, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this UpdateDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateDeploymentRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.UpdateDeploymentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.UpdateDeploymentRequest"; - }; - - return UpdateDeploymentRequest; - })(); - - v1.DeleteDeploymentRequest = (function() { - - /** - * Properties of a DeleteDeploymentRequest. - * @memberof google.cloud.config.v1 - * @interface IDeleteDeploymentRequest - * @property {string|null} [name] DeleteDeploymentRequest name - * @property {string|null} [requestId] DeleteDeploymentRequest requestId - * @property {boolean|null} [force] DeleteDeploymentRequest force - * @property {google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy|null} [deletePolicy] DeleteDeploymentRequest deletePolicy - */ - - /** - * Constructs a new DeleteDeploymentRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a DeleteDeploymentRequest. - * @implements IDeleteDeploymentRequest - * @constructor - * @param {google.cloud.config.v1.IDeleteDeploymentRequest=} [properties] Properties to set - */ - function DeleteDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @instance - */ - DeleteDeploymentRequest.prototype.name = ""; - - /** - * DeleteDeploymentRequest requestId. - * @member {string} requestId - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @instance - */ - DeleteDeploymentRequest.prototype.requestId = ""; - - /** - * DeleteDeploymentRequest force. - * @member {boolean} force - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @instance - */ - DeleteDeploymentRequest.prototype.force = false; - - /** - * DeleteDeploymentRequest deletePolicy. - * @member {google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy} deletePolicy - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @instance - */ - DeleteDeploymentRequest.prototype.deletePolicy = 0; - - /** - * Creates a new DeleteDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @static - * @param {google.cloud.config.v1.IDeleteDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.DeleteDeploymentRequest} DeleteDeploymentRequest instance - */ - DeleteDeploymentRequest.create = function create(properties) { - return new DeleteDeploymentRequest(properties); - }; - - /** - * Encodes the specified DeleteDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.DeleteDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @static - * @param {google.cloud.config.v1.IDeleteDeploymentRequest} message DeleteDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDeploymentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); - if (message.deletePolicy != null && Object.hasOwnProperty.call(message, "deletePolicy")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.deletePolicy); - return writer; - }; - - /** - * Encodes the specified DeleteDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeleteDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @static - * @param {google.cloud.config.v1.IDeleteDeploymentRequest} message DeleteDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.DeleteDeploymentRequest} DeleteDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDeploymentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.DeleteDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - case 3: { - message.force = reader.bool(); - break; - } - case 4: { - message.deletePolicy = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.DeleteDeploymentRequest} DeleteDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteDeploymentRequest message. - * @function verify - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteDeploymentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.deletePolicy != null && message.hasOwnProperty("deletePolicy")) - switch (message.deletePolicy) { - default: - return "deletePolicy: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a DeleteDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.DeleteDeploymentRequest} DeleteDeploymentRequest - */ - DeleteDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.DeleteDeploymentRequest) - return object; - var message = new $root.google.cloud.config.v1.DeleteDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.force != null) - message.force = Boolean(object.force); - switch (object.deletePolicy) { - default: - if (typeof object.deletePolicy === "number") { - message.deletePolicy = object.deletePolicy; - break; - } - break; - case "DELETE_POLICY_UNSPECIFIED": - case 0: - message.deletePolicy = 0; - break; - case "DELETE": - case 1: - message.deletePolicy = 1; - break; - case "ABANDON": - case 2: - message.deletePolicy = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a DeleteDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @static - * @param {google.cloud.config.v1.DeleteDeploymentRequest} message DeleteDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteDeploymentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - object.force = false; - object.deletePolicy = options.enums === String ? "DELETE_POLICY_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.deletePolicy != null && message.hasOwnProperty("deletePolicy")) - object.deletePolicy = options.enums === String ? $root.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy[message.deletePolicy] === undefined ? message.deletePolicy : $root.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy[message.deletePolicy] : message.deletePolicy; - return object; - }; - - /** - * Converts this DeleteDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteDeploymentRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.DeleteDeploymentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.DeleteDeploymentRequest"; - }; - - /** - * DeletePolicy enum. - * @name google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy - * @enum {number} - * @property {number} DELETE_POLICY_UNSPECIFIED=0 DELETE_POLICY_UNSPECIFIED value - * @property {number} DELETE=1 DELETE value - * @property {number} ABANDON=2 ABANDON value - */ - DeleteDeploymentRequest.DeletePolicy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DELETE_POLICY_UNSPECIFIED"] = 0; - values[valuesById[1] = "DELETE"] = 1; - values[valuesById[2] = "ABANDON"] = 2; - return values; - })(); - - return DeleteDeploymentRequest; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.config.v1 - * @interface IOperationMetadata - * @property {google.cloud.config.v1.IDeploymentOperationMetadata|null} [deploymentMetadata] OperationMetadata deploymentMetadata - * @property {google.cloud.config.v1.IPreviewOperationMetadata|null} [previewMetadata] OperationMetadata previewMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.config.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.config.v1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationMetadata deploymentMetadata. - * @member {google.cloud.config.v1.IDeploymentOperationMetadata|null|undefined} deploymentMetadata - * @memberof google.cloud.config.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.deploymentMetadata = null; - - /** - * OperationMetadata previewMetadata. - * @member {google.cloud.config.v1.IPreviewOperationMetadata|null|undefined} previewMetadata - * @memberof google.cloud.config.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.previewMetadata = null; - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.config.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.config.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.config.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.config.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.config.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.config.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.config.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * OperationMetadata resourceMetadata. - * @member {"deploymentMetadata"|"previewMetadata"|undefined} resourceMetadata - * @memberof google.cloud.config.v1.OperationMetadata - * @instance - */ - Object.defineProperty(OperationMetadata.prototype, "resourceMetadata", { - get: $util.oneOfGetter($oneOfFields = ["deploymentMetadata", "previewMetadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.OperationMetadata - * @static - * @param {google.cloud.config.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.config.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.config.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.OperationMetadata - * @static - * @param {google.cloud.config.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); - if (message.deploymentMetadata != null && Object.hasOwnProperty.call(message, "deploymentMetadata")) - $root.google.cloud.config.v1.DeploymentOperationMetadata.encode(message.deploymentMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.previewMetadata != null && Object.hasOwnProperty.call(message, "previewMetadata")) - $root.google.cloud.config.v1.PreviewOperationMetadata.encode(message.previewMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.OperationMetadata - * @static - * @param {google.cloud.config.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 8: { - message.deploymentMetadata = $root.google.cloud.config.v1.DeploymentOperationMetadata.decode(reader, reader.uint32()); - break; - } - case 9: { - message.previewMetadata = $root.google.cloud.config.v1.PreviewOperationMetadata.decode(reader, reader.uint32()); - break; - } - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationMetadata message. - * @function verify - * @memberof google.cloud.config.v1.OperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.deploymentMetadata != null && message.hasOwnProperty("deploymentMetadata")) { - properties.resourceMetadata = 1; - { - var error = $root.google.cloud.config.v1.DeploymentOperationMetadata.verify(message.deploymentMetadata); - if (error) - return "deploymentMetadata." + error; - } - } - if (message.previewMetadata != null && message.hasOwnProperty("previewMetadata")) { - if (properties.resourceMetadata === 1) - return "resourceMetadata: multiple values"; - properties.resourceMetadata = 1; - { - var error = $root.google.cloud.config.v1.PreviewOperationMetadata.verify(message.previewMetadata); - if (error) - return "previewMetadata." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.config.v1.OperationMetadata(); - if (object.deploymentMetadata != null) { - if (typeof object.deploymentMetadata !== "object") - throw TypeError(".google.cloud.config.v1.OperationMetadata.deploymentMetadata: object expected"); - message.deploymentMetadata = $root.google.cloud.config.v1.DeploymentOperationMetadata.fromObject(object.deploymentMetadata); - } - if (object.previewMetadata != null) { - if (typeof object.previewMetadata !== "object") - throw TypeError(".google.cloud.config.v1.OperationMetadata.previewMetadata: object expected"); - message.previewMetadata = $root.google.cloud.config.v1.PreviewOperationMetadata.fromObject(object.previewMetadata); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.config.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.config.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.OperationMetadata - * @static - * @param {google.cloud.config.v1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; - if (message.deploymentMetadata != null && message.hasOwnProperty("deploymentMetadata")) { - object.deploymentMetadata = $root.google.cloud.config.v1.DeploymentOperationMetadata.toObject(message.deploymentMetadata, options); - if (options.oneofs) - object.resourceMetadata = "deploymentMetadata"; - } - if (message.previewMetadata != null && message.hasOwnProperty("previewMetadata")) { - object.previewMetadata = $root.google.cloud.config.v1.PreviewOperationMetadata.toObject(message.previewMetadata, options); - if (options.oneofs) - object.resourceMetadata = "previewMetadata"; - } - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.OperationMetadata - * @instance - * @returns {Object.} JSON object - */ - OperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationMetadata - * @function getTypeUrl - * @memberof google.cloud.config.v1.OperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1.Revision = (function() { - - /** - * Properties of a Revision. - * @memberof google.cloud.config.v1 - * @interface IRevision - * @property {google.cloud.config.v1.ITerraformBlueprint|null} [terraformBlueprint] Revision terraformBlueprint - * @property {string|null} [name] Revision name - * @property {google.protobuf.ITimestamp|null} [createTime] Revision createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Revision updateTime - * @property {google.cloud.config.v1.Revision.Action|null} [action] Revision action - * @property {google.cloud.config.v1.Revision.State|null} [state] Revision state - * @property {google.cloud.config.v1.IApplyResults|null} [applyResults] Revision applyResults - * @property {string|null} [stateDetail] Revision stateDetail - * @property {google.cloud.config.v1.Revision.ErrorCode|null} [errorCode] Revision errorCode - * @property {string|null} [build] Revision build - * @property {string|null} [logs] Revision logs - * @property {Array.|null} [tfErrors] Revision tfErrors - * @property {string|null} [errorLogs] Revision errorLogs - * @property {string|null} [serviceAccount] Revision serviceAccount - * @property {boolean|null} [importExistingResources] Revision importExistingResources - * @property {string|null} [workerPool] Revision workerPool - * @property {string|null} [tfVersionConstraint] Revision tfVersionConstraint - * @property {string|null} [tfVersion] Revision tfVersion - * @property {string|null} [quotaValidationResults] Revision quotaValidationResults - * @property {google.cloud.config.v1.QuotaValidation|null} [quotaValidation] Revision quotaValidation - * @property {google.cloud.config.v1.IProviderConfig|null} [providerConfig] Revision providerConfig - */ - - /** - * Constructs a new Revision. - * @memberof google.cloud.config.v1 - * @classdesc Represents a Revision. - * @implements IRevision - * @constructor - * @param {google.cloud.config.v1.IRevision=} [properties] Properties to set - */ - function Revision(properties) { - this.tfErrors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Revision terraformBlueprint. - * @member {google.cloud.config.v1.ITerraformBlueprint|null|undefined} terraformBlueprint - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.terraformBlueprint = null; - - /** - * Revision name. - * @member {string} name - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.name = ""; - - /** - * Revision createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.createTime = null; - - /** - * Revision updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.updateTime = null; - - /** - * Revision action. - * @member {google.cloud.config.v1.Revision.Action} action - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.action = 0; - - /** - * Revision state. - * @member {google.cloud.config.v1.Revision.State} state - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.state = 0; - - /** - * Revision applyResults. - * @member {google.cloud.config.v1.IApplyResults|null|undefined} applyResults - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.applyResults = null; - - /** - * Revision stateDetail. - * @member {string} stateDetail - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.stateDetail = ""; - - /** - * Revision errorCode. - * @member {google.cloud.config.v1.Revision.ErrorCode} errorCode - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.errorCode = 0; - - /** - * Revision build. - * @member {string} build - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.build = ""; - - /** - * Revision logs. - * @member {string} logs - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.logs = ""; - - /** - * Revision tfErrors. - * @member {Array.} tfErrors - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.tfErrors = $util.emptyArray; - - /** - * Revision errorLogs. - * @member {string} errorLogs - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.errorLogs = ""; - - /** - * Revision serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.serviceAccount = ""; - - /** - * Revision importExistingResources. - * @member {boolean} importExistingResources - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.importExistingResources = false; - - /** - * Revision workerPool. - * @member {string} workerPool - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.workerPool = ""; - - /** - * Revision tfVersionConstraint. - * @member {string} tfVersionConstraint - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.tfVersionConstraint = ""; - - /** - * Revision tfVersion. - * @member {string} tfVersion - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.tfVersion = ""; - - /** - * Revision quotaValidationResults. - * @member {string} quotaValidationResults - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.quotaValidationResults = ""; - - /** - * Revision quotaValidation. - * @member {google.cloud.config.v1.QuotaValidation} quotaValidation - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.quotaValidation = 0; - - /** - * Revision providerConfig. - * @member {google.cloud.config.v1.IProviderConfig|null|undefined} providerConfig - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Revision.prototype.providerConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Revision blueprint. - * @member {"terraformBlueprint"|undefined} blueprint - * @memberof google.cloud.config.v1.Revision - * @instance - */ - Object.defineProperty(Revision.prototype, "blueprint", { - get: $util.oneOfGetter($oneOfFields = ["terraformBlueprint"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Revision instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.Revision - * @static - * @param {google.cloud.config.v1.IRevision=} [properties] Properties to set - * @returns {google.cloud.config.v1.Revision} Revision instance - */ - Revision.create = function create(properties) { - return new Revision(properties); - }; - - /** - * Encodes the specified Revision message. Does not implicitly {@link google.cloud.config.v1.Revision.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.Revision - * @static - * @param {google.cloud.config.v1.IRevision} message Revision message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Revision.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.action); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.terraformBlueprint != null && Object.hasOwnProperty.call(message, "terraformBlueprint")) - $root.google.cloud.config.v1.TerraformBlueprint.encode(message.terraformBlueprint, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.applyResults != null && Object.hasOwnProperty.call(message, "applyResults")) - $root.google.cloud.config.v1.ApplyResults.encode(message.applyResults, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.stateDetail != null && Object.hasOwnProperty.call(message, "stateDetail")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.stateDetail); - if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.errorCode); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.build); - if (message.logs != null && Object.hasOwnProperty.call(message, "logs")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.logs); - if (message.tfErrors != null && message.tfErrors.length) - for (var i = 0; i < message.tfErrors.length; ++i) - $root.google.cloud.config.v1.TerraformError.encode(message.tfErrors[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.errorLogs != null && Object.hasOwnProperty.call(message, "errorLogs")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.errorLogs); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.serviceAccount); - if (message.importExistingResources != null && Object.hasOwnProperty.call(message, "importExistingResources")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.importExistingResources); - if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.workerPool); - if (message.tfVersionConstraint != null && Object.hasOwnProperty.call(message, "tfVersionConstraint")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.tfVersionConstraint); - if (message.tfVersion != null && Object.hasOwnProperty.call(message, "tfVersion")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.tfVersion); - if (message.quotaValidation != null && Object.hasOwnProperty.call(message, "quotaValidation")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.quotaValidation); - if (message.providerConfig != null && Object.hasOwnProperty.call(message, "providerConfig")) - $root.google.cloud.config.v1.ProviderConfig.encode(message.providerConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.quotaValidationResults != null && Object.hasOwnProperty.call(message, "quotaValidationResults")) - writer.uint32(/* id 29, wireType 2 =*/234).string(message.quotaValidationResults); - return writer; - }; - - /** - * Encodes the specified Revision message, length delimited. Does not implicitly {@link google.cloud.config.v1.Revision.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.Revision - * @static - * @param {google.cloud.config.v1.IRevision} message Revision message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Revision.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Revision message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.Revision - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.Revision} Revision - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Revision.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.Revision(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 6: { - message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.decode(reader, reader.uint32()); - break; - } - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.action = reader.int32(); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 7: { - message.applyResults = $root.google.cloud.config.v1.ApplyResults.decode(reader, reader.uint32()); - break; - } - case 8: { - message.stateDetail = reader.string(); - break; - } - case 9: { - message.errorCode = reader.int32(); - break; - } - case 10: { - message.build = reader.string(); - break; - } - case 11: { - message.logs = reader.string(); - break; - } - case 12: { - if (!(message.tfErrors && message.tfErrors.length)) - message.tfErrors = []; - message.tfErrors.push($root.google.cloud.config.v1.TerraformError.decode(reader, reader.uint32())); - break; - } - case 13: { - message.errorLogs = reader.string(); - break; - } - case 14: { - message.serviceAccount = reader.string(); - break; - } - case 15: { - message.importExistingResources = reader.bool(); - break; - } - case 17: { - message.workerPool = reader.string(); - break; - } - case 18: { - message.tfVersionConstraint = reader.string(); - break; - } - case 19: { - message.tfVersion = reader.string(); - break; - } - case 29: { - message.quotaValidationResults = reader.string(); - break; - } - case 20: { - message.quotaValidation = reader.int32(); - break; - } - case 21: { - message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Revision message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.Revision - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.Revision} Revision - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Revision.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Revision message. - * @function verify - * @memberof google.cloud.config.v1.Revision - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Revision.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { - properties.blueprint = 1; - { - var error = $root.google.cloud.config.v1.TerraformBlueprint.verify(message.terraformBlueprint); - if (error) - return "terraformBlueprint." + error; - } - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.applyResults != null && message.hasOwnProperty("applyResults")) { - var error = $root.google.cloud.config.v1.ApplyResults.verify(message.applyResults); - if (error) - return "applyResults." + error; - } - if (message.stateDetail != null && message.hasOwnProperty("stateDetail")) - if (!$util.isString(message.stateDetail)) - return "stateDetail: string expected"; - if (message.errorCode != null && message.hasOwnProperty("errorCode")) - switch (message.errorCode) { - default: - return "errorCode: enum value expected"; - case 0: - case 1: - case 4: - case 5: - case 7: - case 8: - break; - } - if (message.build != null && message.hasOwnProperty("build")) - if (!$util.isString(message.build)) - return "build: string expected"; - if (message.logs != null && message.hasOwnProperty("logs")) - if (!$util.isString(message.logs)) - return "logs: string expected"; - if (message.tfErrors != null && message.hasOwnProperty("tfErrors")) { - if (!Array.isArray(message.tfErrors)) - return "tfErrors: array expected"; - for (var i = 0; i < message.tfErrors.length; ++i) { - var error = $root.google.cloud.config.v1.TerraformError.verify(message.tfErrors[i]); - if (error) - return "tfErrors." + error; - } - } - if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) - if (!$util.isString(message.errorLogs)) - return "errorLogs: string expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.importExistingResources != null && message.hasOwnProperty("importExistingResources")) - if (typeof message.importExistingResources !== "boolean") - return "importExistingResources: boolean expected"; - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - if (!$util.isString(message.workerPool)) - return "workerPool: string expected"; - if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) - if (!$util.isString(message.tfVersionConstraint)) - return "tfVersionConstraint: string expected"; - if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) - if (!$util.isString(message.tfVersion)) - return "tfVersion: string expected"; - if (message.quotaValidationResults != null && message.hasOwnProperty("quotaValidationResults")) - if (!$util.isString(message.quotaValidationResults)) - return "quotaValidationResults: string expected"; - if (message.quotaValidation != null && message.hasOwnProperty("quotaValidation")) - switch (message.quotaValidation) { - default: - return "quotaValidation: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) { - var error = $root.google.cloud.config.v1.ProviderConfig.verify(message.providerConfig); - if (error) - return "providerConfig." + error; - } - return null; - }; - - /** - * Creates a Revision message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.Revision - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.Revision} Revision - */ - Revision.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.Revision) - return object; - var message = new $root.google.cloud.config.v1.Revision(); - if (object.terraformBlueprint != null) { - if (typeof object.terraformBlueprint !== "object") - throw TypeError(".google.cloud.config.v1.Revision.terraformBlueprint: object expected"); - message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.fromObject(object.terraformBlueprint); - } - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.config.v1.Revision.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.config.v1.Revision.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "CREATE": - case 1: - message.action = 1; - break; - case "UPDATE": - case 2: - message.action = 2; - break; - case "DELETE": - case 3: - message.action = 3; - break; - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "APPLYING": - case 1: - message.state = 1; - break; - case "APPLIED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - } - if (object.applyResults != null) { - if (typeof object.applyResults !== "object") - throw TypeError(".google.cloud.config.v1.Revision.applyResults: object expected"); - message.applyResults = $root.google.cloud.config.v1.ApplyResults.fromObject(object.applyResults); - } - if (object.stateDetail != null) - message.stateDetail = String(object.stateDetail); - switch (object.errorCode) { - default: - if (typeof object.errorCode === "number") { - message.errorCode = object.errorCode; - break; - } - break; - case "ERROR_CODE_UNSPECIFIED": - case 0: - message.errorCode = 0; - break; - case "CLOUD_BUILD_PERMISSION_DENIED": - case 1: - message.errorCode = 1; - break; - case "APPLY_BUILD_API_FAILED": - case 4: - message.errorCode = 4; - break; - case "APPLY_BUILD_RUN_FAILED": - case 5: - message.errorCode = 5; - break; - case "QUOTA_VALIDATION_FAILED": - case 7: - message.errorCode = 7; - break; - case "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": - case 8: - message.errorCode = 8; - break; - } - if (object.build != null) - message.build = String(object.build); - if (object.logs != null) - message.logs = String(object.logs); - if (object.tfErrors) { - if (!Array.isArray(object.tfErrors)) - throw TypeError(".google.cloud.config.v1.Revision.tfErrors: array expected"); - message.tfErrors = []; - for (var i = 0; i < object.tfErrors.length; ++i) { - if (typeof object.tfErrors[i] !== "object") - throw TypeError(".google.cloud.config.v1.Revision.tfErrors: object expected"); - message.tfErrors[i] = $root.google.cloud.config.v1.TerraformError.fromObject(object.tfErrors[i]); - } - } - if (object.errorLogs != null) - message.errorLogs = String(object.errorLogs); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.importExistingResources != null) - message.importExistingResources = Boolean(object.importExistingResources); - if (object.workerPool != null) - message.workerPool = String(object.workerPool); - if (object.tfVersionConstraint != null) - message.tfVersionConstraint = String(object.tfVersionConstraint); - if (object.tfVersion != null) - message.tfVersion = String(object.tfVersion); - if (object.quotaValidationResults != null) - message.quotaValidationResults = String(object.quotaValidationResults); - switch (object.quotaValidation) { - default: - if (typeof object.quotaValidation === "number") { - message.quotaValidation = object.quotaValidation; - break; - } - break; - case "QUOTA_VALIDATION_UNSPECIFIED": - case 0: - message.quotaValidation = 0; - break; - case "ENABLED": - case 1: - message.quotaValidation = 1; - break; - case "ENFORCED": - case 2: - message.quotaValidation = 2; - break; - } - if (object.providerConfig != null) { - if (typeof object.providerConfig !== "object") - throw TypeError(".google.cloud.config.v1.Revision.providerConfig: object expected"); - message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.fromObject(object.providerConfig); - } - return message; - }; - - /** - * Creates a plain object from a Revision message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.Revision - * @static - * @param {google.cloud.config.v1.Revision} message Revision - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Revision.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tfErrors = []; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.applyResults = null; - object.stateDetail = ""; - object.errorCode = options.enums === String ? "ERROR_CODE_UNSPECIFIED" : 0; - object.build = ""; - object.logs = ""; - object.errorLogs = ""; - object.serviceAccount = ""; - object.importExistingResources = false; - object.workerPool = ""; - object.tfVersionConstraint = ""; - object.tfVersion = ""; - object.quotaValidation = options.enums === String ? "QUOTA_VALIDATION_UNSPECIFIED" : 0; - object.providerConfig = null; - object.quotaValidationResults = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.cloud.config.v1.Revision.Action[message.action] === undefined ? message.action : $root.google.cloud.config.v1.Revision.Action[message.action] : message.action; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.config.v1.Revision.State[message.state] === undefined ? message.state : $root.google.cloud.config.v1.Revision.State[message.state] : message.state; - if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { - object.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.toObject(message.terraformBlueprint, options); - if (options.oneofs) - object.blueprint = "terraformBlueprint"; - } - if (message.applyResults != null && message.hasOwnProperty("applyResults")) - object.applyResults = $root.google.cloud.config.v1.ApplyResults.toObject(message.applyResults, options); - if (message.stateDetail != null && message.hasOwnProperty("stateDetail")) - object.stateDetail = message.stateDetail; - if (message.errorCode != null && message.hasOwnProperty("errorCode")) - object.errorCode = options.enums === String ? $root.google.cloud.config.v1.Revision.ErrorCode[message.errorCode] === undefined ? message.errorCode : $root.google.cloud.config.v1.Revision.ErrorCode[message.errorCode] : message.errorCode; - if (message.build != null && message.hasOwnProperty("build")) - object.build = message.build; - if (message.logs != null && message.hasOwnProperty("logs")) - object.logs = message.logs; - if (message.tfErrors && message.tfErrors.length) { - object.tfErrors = []; - for (var j = 0; j < message.tfErrors.length; ++j) - object.tfErrors[j] = $root.google.cloud.config.v1.TerraformError.toObject(message.tfErrors[j], options); - } - if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) - object.errorLogs = message.errorLogs; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.importExistingResources != null && message.hasOwnProperty("importExistingResources")) - object.importExistingResources = message.importExistingResources; - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - object.workerPool = message.workerPool; - if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) - object.tfVersionConstraint = message.tfVersionConstraint; - if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) - object.tfVersion = message.tfVersion; - if (message.quotaValidation != null && message.hasOwnProperty("quotaValidation")) - object.quotaValidation = options.enums === String ? $root.google.cloud.config.v1.QuotaValidation[message.quotaValidation] === undefined ? message.quotaValidation : $root.google.cloud.config.v1.QuotaValidation[message.quotaValidation] : message.quotaValidation; - if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) - object.providerConfig = $root.google.cloud.config.v1.ProviderConfig.toObject(message.providerConfig, options); - if (message.quotaValidationResults != null && message.hasOwnProperty("quotaValidationResults")) - object.quotaValidationResults = message.quotaValidationResults; - return object; - }; - - /** - * Converts this Revision to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.Revision - * @instance - * @returns {Object.} JSON object - */ - Revision.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Revision - * @function getTypeUrl - * @memberof google.cloud.config.v1.Revision - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Revision.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.Revision"; - }; - - /** - * Action enum. - * @name google.cloud.config.v1.Revision.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} CREATE=1 CREATE value - * @property {number} UPDATE=2 UPDATE value - * @property {number} DELETE=3 DELETE value - */ - Revision.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATE"] = 1; - values[valuesById[2] = "UPDATE"] = 2; - values[valuesById[3] = "DELETE"] = 3; - return values; - })(); - - /** - * State enum. - * @name google.cloud.config.v1.Revision.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} APPLYING=1 APPLYING value - * @property {number} APPLIED=2 APPLIED value - * @property {number} FAILED=3 FAILED value - */ - Revision.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "APPLYING"] = 1; - values[valuesById[2] = "APPLIED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - return values; - })(); - - /** - * ErrorCode enum. - * @name google.cloud.config.v1.Revision.ErrorCode - * @enum {number} - * @property {number} ERROR_CODE_UNSPECIFIED=0 ERROR_CODE_UNSPECIFIED value - * @property {number} CLOUD_BUILD_PERMISSION_DENIED=1 CLOUD_BUILD_PERMISSION_DENIED value - * @property {number} APPLY_BUILD_API_FAILED=4 APPLY_BUILD_API_FAILED value - * @property {number} APPLY_BUILD_RUN_FAILED=5 APPLY_BUILD_RUN_FAILED value - * @property {number} QUOTA_VALIDATION_FAILED=7 QUOTA_VALIDATION_FAILED value - * @property {number} EXTERNAL_VALUE_SOURCE_IMPORT_FAILED=8 EXTERNAL_VALUE_SOURCE_IMPORT_FAILED value - */ - Revision.ErrorCode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ERROR_CODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_BUILD_PERMISSION_DENIED"] = 1; - values[valuesById[4] = "APPLY_BUILD_API_FAILED"] = 4; - values[valuesById[5] = "APPLY_BUILD_RUN_FAILED"] = 5; - values[valuesById[7] = "QUOTA_VALIDATION_FAILED"] = 7; - values[valuesById[8] = "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED"] = 8; - return values; - })(); - - return Revision; - })(); - - v1.TerraformError = (function() { - - /** - * Properties of a TerraformError. - * @memberof google.cloud.config.v1 - * @interface ITerraformError - * @property {string|null} [resourceAddress] TerraformError resourceAddress - * @property {number|null} [httpResponseCode] TerraformError httpResponseCode - * @property {string|null} [errorDescription] TerraformError errorDescription - * @property {google.rpc.IStatus|null} [error] TerraformError error - */ - - /** - * Constructs a new TerraformError. - * @memberof google.cloud.config.v1 - * @classdesc Represents a TerraformError. - * @implements ITerraformError - * @constructor - * @param {google.cloud.config.v1.ITerraformError=} [properties] Properties to set - */ - function TerraformError(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TerraformError resourceAddress. - * @member {string} resourceAddress - * @memberof google.cloud.config.v1.TerraformError - * @instance - */ - TerraformError.prototype.resourceAddress = ""; - - /** - * TerraformError httpResponseCode. - * @member {number} httpResponseCode - * @memberof google.cloud.config.v1.TerraformError - * @instance - */ - TerraformError.prototype.httpResponseCode = 0; - - /** - * TerraformError errorDescription. - * @member {string} errorDescription - * @memberof google.cloud.config.v1.TerraformError - * @instance - */ - TerraformError.prototype.errorDescription = ""; - - /** - * TerraformError error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.config.v1.TerraformError - * @instance - */ - TerraformError.prototype.error = null; - - /** - * Creates a new TerraformError instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.TerraformError - * @static - * @param {google.cloud.config.v1.ITerraformError=} [properties] Properties to set - * @returns {google.cloud.config.v1.TerraformError} TerraformError instance - */ - TerraformError.create = function create(properties) { - return new TerraformError(properties); - }; - - /** - * Encodes the specified TerraformError message. Does not implicitly {@link google.cloud.config.v1.TerraformError.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.TerraformError - * @static - * @param {google.cloud.config.v1.ITerraformError} message TerraformError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TerraformError.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceAddress != null && Object.hasOwnProperty.call(message, "resourceAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceAddress); - if (message.httpResponseCode != null && Object.hasOwnProperty.call(message, "httpResponseCode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.httpResponseCode); - if (message.errorDescription != null && Object.hasOwnProperty.call(message, "errorDescription")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorDescription); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TerraformError message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformError.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.TerraformError - * @static - * @param {google.cloud.config.v1.ITerraformError} message TerraformError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TerraformError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TerraformError message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.TerraformError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.TerraformError} TerraformError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TerraformError.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.TerraformError(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.resourceAddress = reader.string(); - break; - } - case 2: { - message.httpResponseCode = reader.int32(); - break; - } - case 3: { - message.errorDescription = reader.string(); - break; - } - case 4: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TerraformError message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.TerraformError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.TerraformError} TerraformError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TerraformError.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TerraformError message. - * @function verify - * @memberof google.cloud.config.v1.TerraformError - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TerraformError.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceAddress != null && message.hasOwnProperty("resourceAddress")) - if (!$util.isString(message.resourceAddress)) - return "resourceAddress: string expected"; - if (message.httpResponseCode != null && message.hasOwnProperty("httpResponseCode")) - if (!$util.isInteger(message.httpResponseCode)) - return "httpResponseCode: integer expected"; - if (message.errorDescription != null && message.hasOwnProperty("errorDescription")) - if (!$util.isString(message.errorDescription)) - return "errorDescription: string expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - return null; - }; - - /** - * Creates a TerraformError message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.TerraformError - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.TerraformError} TerraformError - */ - TerraformError.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.TerraformError) - return object; - var message = new $root.google.cloud.config.v1.TerraformError(); - if (object.resourceAddress != null) - message.resourceAddress = String(object.resourceAddress); - if (object.httpResponseCode != null) - message.httpResponseCode = object.httpResponseCode | 0; - if (object.errorDescription != null) - message.errorDescription = String(object.errorDescription); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.config.v1.TerraformError.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - return message; - }; - - /** - * Creates a plain object from a TerraformError message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.TerraformError - * @static - * @param {google.cloud.config.v1.TerraformError} message TerraformError - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TerraformError.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resourceAddress = ""; - object.httpResponseCode = 0; - object.errorDescription = ""; - object.error = null; - } - if (message.resourceAddress != null && message.hasOwnProperty("resourceAddress")) - object.resourceAddress = message.resourceAddress; - if (message.httpResponseCode != null && message.hasOwnProperty("httpResponseCode")) - object.httpResponseCode = message.httpResponseCode; - if (message.errorDescription != null && message.hasOwnProperty("errorDescription")) - object.errorDescription = message.errorDescription; - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - return object; - }; - - /** - * Converts this TerraformError to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.TerraformError - * @instance - * @returns {Object.} JSON object - */ - TerraformError.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TerraformError - * @function getTypeUrl - * @memberof google.cloud.config.v1.TerraformError - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TerraformError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.TerraformError"; - }; - - return TerraformError; - })(); - - v1.GitSource = (function() { - - /** - * Properties of a GitSource. - * @memberof google.cloud.config.v1 - * @interface IGitSource - * @property {string|null} [repo] GitSource repo - * @property {string|null} [directory] GitSource directory - * @property {string|null} [ref] GitSource ref - */ - - /** - * Constructs a new GitSource. - * @memberof google.cloud.config.v1 - * @classdesc Represents a GitSource. - * @implements IGitSource - * @constructor - * @param {google.cloud.config.v1.IGitSource=} [properties] Properties to set - */ - function GitSource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GitSource repo. - * @member {string|null|undefined} repo - * @memberof google.cloud.config.v1.GitSource - * @instance - */ - GitSource.prototype.repo = null; - - /** - * GitSource directory. - * @member {string|null|undefined} directory - * @memberof google.cloud.config.v1.GitSource - * @instance - */ - GitSource.prototype.directory = null; - - /** - * GitSource ref. - * @member {string|null|undefined} ref - * @memberof google.cloud.config.v1.GitSource - * @instance - */ - GitSource.prototype.ref = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(GitSource.prototype, "_repo", { - get: $util.oneOfGetter($oneOfFields = ["repo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(GitSource.prototype, "_directory", { - get: $util.oneOfGetter($oneOfFields = ["directory"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(GitSource.prototype, "_ref", { - get: $util.oneOfGetter($oneOfFields = ["ref"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GitSource instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.GitSource - * @static - * @param {google.cloud.config.v1.IGitSource=} [properties] Properties to set - * @returns {google.cloud.config.v1.GitSource} GitSource instance - */ - GitSource.create = function create(properties) { - return new GitSource(properties); - }; - - /** - * Encodes the specified GitSource message. Does not implicitly {@link google.cloud.config.v1.GitSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.GitSource - * @static - * @param {google.cloud.config.v1.IGitSource} message GitSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GitSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.repo != null && Object.hasOwnProperty.call(message, "repo")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.repo); - if (message.directory != null && Object.hasOwnProperty.call(message, "directory")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.directory); - if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ref); - return writer; - }; - - /** - * Encodes the specified GitSource message, length delimited. Does not implicitly {@link google.cloud.config.v1.GitSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.GitSource - * @static - * @param {google.cloud.config.v1.IGitSource} message GitSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GitSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GitSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.GitSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.GitSource} GitSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GitSource.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GitSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.repo = reader.string(); - break; - } - case 2: { - message.directory = reader.string(); - break; - } - case 3: { - message.ref = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GitSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.GitSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.GitSource} GitSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GitSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GitSource message. - * @function verify - * @memberof google.cloud.config.v1.GitSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GitSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.repo != null && message.hasOwnProperty("repo")) { - properties._repo = 1; - if (!$util.isString(message.repo)) - return "repo: string expected"; - } - if (message.directory != null && message.hasOwnProperty("directory")) { - properties._directory = 1; - if (!$util.isString(message.directory)) - return "directory: string expected"; - } - if (message.ref != null && message.hasOwnProperty("ref")) { - properties._ref = 1; - if (!$util.isString(message.ref)) - return "ref: string expected"; - } - return null; - }; - - /** - * Creates a GitSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.GitSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.GitSource} GitSource - */ - GitSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.GitSource) - return object; - var message = new $root.google.cloud.config.v1.GitSource(); - if (object.repo != null) - message.repo = String(object.repo); - if (object.directory != null) - message.directory = String(object.directory); - if (object.ref != null) - message.ref = String(object.ref); - return message; - }; - - /** - * Creates a plain object from a GitSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.GitSource - * @static - * @param {google.cloud.config.v1.GitSource} message GitSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GitSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.repo != null && message.hasOwnProperty("repo")) { - object.repo = message.repo; - if (options.oneofs) - object._repo = "repo"; - } - if (message.directory != null && message.hasOwnProperty("directory")) { - object.directory = message.directory; - if (options.oneofs) - object._directory = "directory"; - } - if (message.ref != null && message.hasOwnProperty("ref")) { - object.ref = message.ref; - if (options.oneofs) - object._ref = "ref"; - } - return object; - }; - - /** - * Converts this GitSource to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.GitSource - * @instance - * @returns {Object.} JSON object - */ - GitSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GitSource - * @function getTypeUrl - * @memberof google.cloud.config.v1.GitSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GitSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.GitSource"; - }; - - return GitSource; - })(); - - v1.DeploymentOperationMetadata = (function() { - - /** - * Properties of a DeploymentOperationMetadata. - * @memberof google.cloud.config.v1 - * @interface IDeploymentOperationMetadata - * @property {google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep|null} [step] DeploymentOperationMetadata step - * @property {google.cloud.config.v1.IApplyResults|null} [applyResults] DeploymentOperationMetadata applyResults - * @property {string|null} [build] DeploymentOperationMetadata build - * @property {string|null} [logs] DeploymentOperationMetadata logs - */ - - /** - * Constructs a new DeploymentOperationMetadata. - * @memberof google.cloud.config.v1 - * @classdesc Represents a DeploymentOperationMetadata. - * @implements IDeploymentOperationMetadata - * @constructor - * @param {google.cloud.config.v1.IDeploymentOperationMetadata=} [properties] Properties to set - */ - function DeploymentOperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeploymentOperationMetadata step. - * @member {google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep} step - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @instance - */ - DeploymentOperationMetadata.prototype.step = 0; - - /** - * DeploymentOperationMetadata applyResults. - * @member {google.cloud.config.v1.IApplyResults|null|undefined} applyResults - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @instance - */ - DeploymentOperationMetadata.prototype.applyResults = null; - - /** - * DeploymentOperationMetadata build. - * @member {string} build - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @instance - */ - DeploymentOperationMetadata.prototype.build = ""; - - /** - * DeploymentOperationMetadata logs. - * @member {string} logs - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @instance - */ - DeploymentOperationMetadata.prototype.logs = ""; - - /** - * Creates a new DeploymentOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @static - * @param {google.cloud.config.v1.IDeploymentOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.config.v1.DeploymentOperationMetadata} DeploymentOperationMetadata instance - */ - DeploymentOperationMetadata.create = function create(properties) { - return new DeploymentOperationMetadata(properties); - }; - - /** - * Encodes the specified DeploymentOperationMetadata message. Does not implicitly {@link google.cloud.config.v1.DeploymentOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @static - * @param {google.cloud.config.v1.IDeploymentOperationMetadata} message DeploymentOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeploymentOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.step != null && Object.hasOwnProperty.call(message, "step")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.step); - if (message.applyResults != null && Object.hasOwnProperty.call(message, "applyResults")) - $root.google.cloud.config.v1.ApplyResults.encode(message.applyResults, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.build); - if (message.logs != null && Object.hasOwnProperty.call(message, "logs")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.logs); - return writer; - }; - - /** - * Encodes the specified DeploymentOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeploymentOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @static - * @param {google.cloud.config.v1.IDeploymentOperationMetadata} message DeploymentOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeploymentOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeploymentOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.DeploymentOperationMetadata} DeploymentOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeploymentOperationMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.DeploymentOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.step = reader.int32(); - break; - } - case 2: { - message.applyResults = $root.google.cloud.config.v1.ApplyResults.decode(reader, reader.uint32()); - break; - } - case 3: { - message.build = reader.string(); - break; - } - case 4: { - message.logs = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeploymentOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.DeploymentOperationMetadata} DeploymentOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeploymentOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeploymentOperationMetadata message. - * @function verify - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeploymentOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.step != null && message.hasOwnProperty("step")) - switch (message.step) { - default: - return "step: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - break; - } - if (message.applyResults != null && message.hasOwnProperty("applyResults")) { - var error = $root.google.cloud.config.v1.ApplyResults.verify(message.applyResults); - if (error) - return "applyResults." + error; - } - if (message.build != null && message.hasOwnProperty("build")) - if (!$util.isString(message.build)) - return "build: string expected"; - if (message.logs != null && message.hasOwnProperty("logs")) - if (!$util.isString(message.logs)) - return "logs: string expected"; - return null; - }; - - /** - * Creates a DeploymentOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.DeploymentOperationMetadata} DeploymentOperationMetadata - */ - DeploymentOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.DeploymentOperationMetadata) - return object; - var message = new $root.google.cloud.config.v1.DeploymentOperationMetadata(); - switch (object.step) { - default: - if (typeof object.step === "number") { - message.step = object.step; - break; - } - break; - case "DEPLOYMENT_STEP_UNSPECIFIED": - case 0: - message.step = 0; - break; - case "PREPARING_STORAGE_BUCKET": - case 1: - message.step = 1; - break; - case "DOWNLOADING_BLUEPRINT": - case 2: - message.step = 2; - break; - case "RUNNING_TF_INIT": - case 3: - message.step = 3; - break; - case "RUNNING_TF_PLAN": - case 4: - message.step = 4; - break; - case "RUNNING_TF_APPLY": - case 5: - message.step = 5; - break; - case "RUNNING_TF_DESTROY": - case 6: - message.step = 6; - break; - case "RUNNING_TF_VALIDATE": - case 7: - message.step = 7; - break; - case "UNLOCKING_DEPLOYMENT": - case 8: - message.step = 8; - break; - case "SUCCEEDED": - case 9: - message.step = 9; - break; - case "FAILED": - case 10: - message.step = 10; - break; - case "VALIDATING_REPOSITORY": - case 11: - message.step = 11; - break; - case "RUNNING_QUOTA_VALIDATION": - case 12: - message.step = 12; - break; - } - if (object.applyResults != null) { - if (typeof object.applyResults !== "object") - throw TypeError(".google.cloud.config.v1.DeploymentOperationMetadata.applyResults: object expected"); - message.applyResults = $root.google.cloud.config.v1.ApplyResults.fromObject(object.applyResults); - } - if (object.build != null) - message.build = String(object.build); - if (object.logs != null) - message.logs = String(object.logs); - return message; - }; - - /** - * Creates a plain object from a DeploymentOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @static - * @param {google.cloud.config.v1.DeploymentOperationMetadata} message DeploymentOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeploymentOperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.step = options.enums === String ? "DEPLOYMENT_STEP_UNSPECIFIED" : 0; - object.applyResults = null; - object.build = ""; - object.logs = ""; - } - if (message.step != null && message.hasOwnProperty("step")) - object.step = options.enums === String ? $root.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep[message.step] === undefined ? message.step : $root.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep[message.step] : message.step; - if (message.applyResults != null && message.hasOwnProperty("applyResults")) - object.applyResults = $root.google.cloud.config.v1.ApplyResults.toObject(message.applyResults, options); - if (message.build != null && message.hasOwnProperty("build")) - object.build = message.build; - if (message.logs != null && message.hasOwnProperty("logs")) - object.logs = message.logs; - return object; - }; - - /** - * Converts this DeploymentOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - DeploymentOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeploymentOperationMetadata - * @function getTypeUrl - * @memberof google.cloud.config.v1.DeploymentOperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeploymentOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.DeploymentOperationMetadata"; - }; - - /** - * DeploymentStep enum. - * @name google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep - * @enum {number} - * @property {number} DEPLOYMENT_STEP_UNSPECIFIED=0 DEPLOYMENT_STEP_UNSPECIFIED value - * @property {number} PREPARING_STORAGE_BUCKET=1 PREPARING_STORAGE_BUCKET value - * @property {number} DOWNLOADING_BLUEPRINT=2 DOWNLOADING_BLUEPRINT value - * @property {number} RUNNING_TF_INIT=3 RUNNING_TF_INIT value - * @property {number} RUNNING_TF_PLAN=4 RUNNING_TF_PLAN value - * @property {number} RUNNING_TF_APPLY=5 RUNNING_TF_APPLY value - * @property {number} RUNNING_TF_DESTROY=6 RUNNING_TF_DESTROY value - * @property {number} RUNNING_TF_VALIDATE=7 RUNNING_TF_VALIDATE value - * @property {number} UNLOCKING_DEPLOYMENT=8 UNLOCKING_DEPLOYMENT value - * @property {number} SUCCEEDED=9 SUCCEEDED value - * @property {number} FAILED=10 FAILED value - * @property {number} VALIDATING_REPOSITORY=11 VALIDATING_REPOSITORY value - * @property {number} RUNNING_QUOTA_VALIDATION=12 RUNNING_QUOTA_VALIDATION value - */ - DeploymentOperationMetadata.DeploymentStep = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEPLOYMENT_STEP_UNSPECIFIED"] = 0; - values[valuesById[1] = "PREPARING_STORAGE_BUCKET"] = 1; - values[valuesById[2] = "DOWNLOADING_BLUEPRINT"] = 2; - values[valuesById[3] = "RUNNING_TF_INIT"] = 3; - values[valuesById[4] = "RUNNING_TF_PLAN"] = 4; - values[valuesById[5] = "RUNNING_TF_APPLY"] = 5; - values[valuesById[6] = "RUNNING_TF_DESTROY"] = 6; - values[valuesById[7] = "RUNNING_TF_VALIDATE"] = 7; - values[valuesById[8] = "UNLOCKING_DEPLOYMENT"] = 8; - values[valuesById[9] = "SUCCEEDED"] = 9; - values[valuesById[10] = "FAILED"] = 10; - values[valuesById[11] = "VALIDATING_REPOSITORY"] = 11; - values[valuesById[12] = "RUNNING_QUOTA_VALIDATION"] = 12; - return values; - })(); - - return DeploymentOperationMetadata; - })(); - - v1.Resource = (function() { - - /** - * Properties of a Resource. - * @memberof google.cloud.config.v1 - * @interface IResource - * @property {string|null} [name] Resource name - * @property {google.cloud.config.v1.IResourceTerraformInfo|null} [terraformInfo] Resource terraformInfo - * @property {Object.|null} [caiAssets] Resource caiAssets - * @property {google.cloud.config.v1.Resource.Intent|null} [intent] Resource intent - * @property {google.cloud.config.v1.Resource.State|null} [state] Resource state - */ - - /** - * Constructs a new Resource. - * @memberof google.cloud.config.v1 - * @classdesc Represents a Resource. - * @implements IResource - * @constructor - * @param {google.cloud.config.v1.IResource=} [properties] Properties to set - */ - function Resource(properties) { - this.caiAssets = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Resource name. - * @member {string} name - * @memberof google.cloud.config.v1.Resource - * @instance - */ - Resource.prototype.name = ""; - - /** - * Resource terraformInfo. - * @member {google.cloud.config.v1.IResourceTerraformInfo|null|undefined} terraformInfo - * @memberof google.cloud.config.v1.Resource - * @instance - */ - Resource.prototype.terraformInfo = null; - - /** - * Resource caiAssets. - * @member {Object.} caiAssets - * @memberof google.cloud.config.v1.Resource - * @instance - */ - Resource.prototype.caiAssets = $util.emptyObject; - - /** - * Resource intent. - * @member {google.cloud.config.v1.Resource.Intent} intent - * @memberof google.cloud.config.v1.Resource - * @instance - */ - Resource.prototype.intent = 0; - - /** - * Resource state. - * @member {google.cloud.config.v1.Resource.State} state - * @memberof google.cloud.config.v1.Resource - * @instance - */ - Resource.prototype.state = 0; - - /** - * Creates a new Resource instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.Resource - * @static - * @param {google.cloud.config.v1.IResource=} [properties] Properties to set - * @returns {google.cloud.config.v1.Resource} Resource instance - */ - Resource.create = function create(properties) { - return new Resource(properties); - }; - - /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.config.v1.Resource.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.Resource - * @static - * @param {google.cloud.config.v1.IResource} message Resource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Resource.encode = function encode(message, writer) { - 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.terraformInfo != null && Object.hasOwnProperty.call(message, "terraformInfo")) - $root.google.cloud.config.v1.ResourceTerraformInfo.encode(message.terraformInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.caiAssets != null && Object.hasOwnProperty.call(message, "caiAssets")) - for (var keys = Object.keys(message.caiAssets), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.config.v1.ResourceCAIInfo.encode(message.caiAssets[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.intent); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - return writer; - }; - - /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.config.v1.Resource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.Resource - * @static - * @param {google.cloud.config.v1.IResource} message Resource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Resource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Resource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.Resource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.Resource} Resource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Resource.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.Resource(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.terraformInfo = $root.google.cloud.config.v1.ResourceTerraformInfo.decode(reader, reader.uint32()); - break; - } - case 3: { - if (message.caiAssets === $util.emptyObject) - message.caiAssets = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.config.v1.ResourceCAIInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.caiAssets[key] = value; - break; - } - case 4: { - message.intent = reader.int32(); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Resource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.Resource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.Resource} Resource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Resource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Resource message. - * @function verify - * @memberof google.cloud.config.v1.Resource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Resource.verify = function verify(message) { - if (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.terraformInfo != null && message.hasOwnProperty("terraformInfo")) { - var error = $root.google.cloud.config.v1.ResourceTerraformInfo.verify(message.terraformInfo); - if (error) - return "terraformInfo." + error; - } - if (message.caiAssets != null && message.hasOwnProperty("caiAssets")) { - if (!$util.isObject(message.caiAssets)) - return "caiAssets: object expected"; - var key = Object.keys(message.caiAssets); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.config.v1.ResourceCAIInfo.verify(message.caiAssets[key[i]]); - if (error) - return "caiAssets." + error; - } - } - if (message.intent != null && message.hasOwnProperty("intent")) - switch (message.intent) { - default: - return "intent: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.Resource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.Resource} Resource - */ - Resource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.Resource) - return object; - var message = new $root.google.cloud.config.v1.Resource(); - if (object.name != null) - message.name = String(object.name); - if (object.terraformInfo != null) { - if (typeof object.terraformInfo !== "object") - throw TypeError(".google.cloud.config.v1.Resource.terraformInfo: object expected"); - message.terraformInfo = $root.google.cloud.config.v1.ResourceTerraformInfo.fromObject(object.terraformInfo); - } - if (object.caiAssets) { - if (typeof object.caiAssets !== "object") - throw TypeError(".google.cloud.config.v1.Resource.caiAssets: object expected"); - message.caiAssets = {}; - for (var keys = Object.keys(object.caiAssets), i = 0; i < keys.length; ++i) { - if (typeof object.caiAssets[keys[i]] !== "object") - throw TypeError(".google.cloud.config.v1.Resource.caiAssets: object expected"); - message.caiAssets[keys[i]] = $root.google.cloud.config.v1.ResourceCAIInfo.fromObject(object.caiAssets[keys[i]]); - } - } - switch (object.intent) { - default: - if (typeof object.intent === "number") { - message.intent = object.intent; - break; - } - break; - case "INTENT_UNSPECIFIED": - case 0: - message.intent = 0; - break; - case "CREATE": - case 1: - message.intent = 1; - break; - case "UPDATE": - case 2: - message.intent = 2; - break; - case "DELETE": - case 3: - message.intent = 3; - break; - case "RECREATE": - case 4: - message.intent = 4; - break; - case "UNCHANGED": - case 5: - message.intent = 5; - break; - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PLANNED": - case 1: - message.state = 1; - break; - case "IN_PROGRESS": - case 2: - message.state = 2; - break; - case "RECONCILED": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.Resource - * @static - * @param {google.cloud.config.v1.Resource} message Resource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Resource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.caiAssets = {}; - if (options.defaults) { - object.name = ""; - object.terraformInfo = null; - object.intent = options.enums === String ? "INTENT_UNSPECIFIED" : 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.terraformInfo != null && message.hasOwnProperty("terraformInfo")) - object.terraformInfo = $root.google.cloud.config.v1.ResourceTerraformInfo.toObject(message.terraformInfo, options); - var keys2; - if (message.caiAssets && (keys2 = Object.keys(message.caiAssets)).length) { - object.caiAssets = {}; - for (var j = 0; j < keys2.length; ++j) - object.caiAssets[keys2[j]] = $root.google.cloud.config.v1.ResourceCAIInfo.toObject(message.caiAssets[keys2[j]], options); - } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = options.enums === String ? $root.google.cloud.config.v1.Resource.Intent[message.intent] === undefined ? message.intent : $root.google.cloud.config.v1.Resource.Intent[message.intent] : message.intent; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.config.v1.Resource.State[message.state] === undefined ? message.state : $root.google.cloud.config.v1.Resource.State[message.state] : message.state; - return object; - }; - - /** - * Converts this Resource to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.Resource - * @instance - * @returns {Object.} JSON object - */ - Resource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Resource - * @function getTypeUrl - * @memberof google.cloud.config.v1.Resource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.Resource"; - }; - - /** - * Intent enum. - * @name google.cloud.config.v1.Resource.Intent - * @enum {number} - * @property {number} INTENT_UNSPECIFIED=0 INTENT_UNSPECIFIED value - * @property {number} CREATE=1 CREATE value - * @property {number} UPDATE=2 UPDATE value - * @property {number} DELETE=3 DELETE value - * @property {number} RECREATE=4 RECREATE value - * @property {number} UNCHANGED=5 UNCHANGED value - */ - Resource.Intent = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTENT_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATE"] = 1; - values[valuesById[2] = "UPDATE"] = 2; - values[valuesById[3] = "DELETE"] = 3; - values[valuesById[4] = "RECREATE"] = 4; - values[valuesById[5] = "UNCHANGED"] = 5; - return values; - })(); - - /** - * State enum. - * @name google.cloud.config.v1.Resource.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PLANNED=1 PLANNED value - * @property {number} IN_PROGRESS=2 IN_PROGRESS value - * @property {number} RECONCILED=3 RECONCILED value - * @property {number} FAILED=4 FAILED value - */ - Resource.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PLANNED"] = 1; - values[valuesById[2] = "IN_PROGRESS"] = 2; - values[valuesById[3] = "RECONCILED"] = 3; - values[valuesById[4] = "FAILED"] = 4; - return values; - })(); - - return Resource; - })(); - - v1.ResourceTerraformInfo = (function() { - - /** - * Properties of a ResourceTerraformInfo. - * @memberof google.cloud.config.v1 - * @interface IResourceTerraformInfo - * @property {string|null} [address] ResourceTerraformInfo address - * @property {string|null} [type] ResourceTerraformInfo type - * @property {string|null} [id] ResourceTerraformInfo id - */ - - /** - * Constructs a new ResourceTerraformInfo. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ResourceTerraformInfo. - * @implements IResourceTerraformInfo - * @constructor - * @param {google.cloud.config.v1.IResourceTerraformInfo=} [properties] Properties to set - */ - function ResourceTerraformInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceTerraformInfo address. - * @member {string} address - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @instance - */ - ResourceTerraformInfo.prototype.address = ""; - - /** - * ResourceTerraformInfo type. - * @member {string} type - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @instance - */ - ResourceTerraformInfo.prototype.type = ""; - - /** - * ResourceTerraformInfo id. - * @member {string} id - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @instance - */ - ResourceTerraformInfo.prototype.id = ""; - - /** - * Creates a new ResourceTerraformInfo instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @static - * @param {google.cloud.config.v1.IResourceTerraformInfo=} [properties] Properties to set - * @returns {google.cloud.config.v1.ResourceTerraformInfo} ResourceTerraformInfo instance - */ - ResourceTerraformInfo.create = function create(properties) { - return new ResourceTerraformInfo(properties); - }; - - /** - * Encodes the specified ResourceTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceTerraformInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @static - * @param {google.cloud.config.v1.IResourceTerraformInfo} message ResourceTerraformInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceTerraformInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.id); - return writer; - }; - - /** - * Encodes the specified ResourceTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceTerraformInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @static - * @param {google.cloud.config.v1.IResourceTerraformInfo} message ResourceTerraformInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceTerraformInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceTerraformInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ResourceTerraformInfo} ResourceTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceTerraformInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceTerraformInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.address = reader.string(); - break; - } - case 2: { - message.type = reader.string(); - break; - } - case 3: { - message.id = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceTerraformInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ResourceTerraformInfo} ResourceTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceTerraformInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceTerraformInfo message. - * @function verify - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceTerraformInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - return null; - }; - - /** - * Creates a ResourceTerraformInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ResourceTerraformInfo} ResourceTerraformInfo - */ - ResourceTerraformInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ResourceTerraformInfo) - return object; - var message = new $root.google.cloud.config.v1.ResourceTerraformInfo(); - if (object.address != null) - message.address = String(object.address); - if (object.type != null) - message.type = String(object.type); - if (object.id != null) - message.id = String(object.id); - return message; - }; - - /** - * Creates a plain object from a ResourceTerraformInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @static - * @param {google.cloud.config.v1.ResourceTerraformInfo} message ResourceTerraformInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceTerraformInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.address = ""; - object.type = ""; - object.id = ""; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - return object; - }; - - /** - * Converts this ResourceTerraformInfo to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @instance - * @returns {Object.} JSON object - */ - ResourceTerraformInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceTerraformInfo - * @function getTypeUrl - * @memberof google.cloud.config.v1.ResourceTerraformInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceTerraformInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ResourceTerraformInfo"; - }; - - return ResourceTerraformInfo; - })(); - - v1.ResourceCAIInfo = (function() { - - /** - * Properties of a ResourceCAIInfo. - * @memberof google.cloud.config.v1 - * @interface IResourceCAIInfo - * @property {string|null} [fullResourceName] ResourceCAIInfo fullResourceName - */ - - /** - * Constructs a new ResourceCAIInfo. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ResourceCAIInfo. - * @implements IResourceCAIInfo - * @constructor - * @param {google.cloud.config.v1.IResourceCAIInfo=} [properties] Properties to set - */ - function ResourceCAIInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceCAIInfo fullResourceName. - * @member {string} fullResourceName - * @memberof google.cloud.config.v1.ResourceCAIInfo - * @instance - */ - ResourceCAIInfo.prototype.fullResourceName = ""; - - /** - * Creates a new ResourceCAIInfo instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ResourceCAIInfo - * @static - * @param {google.cloud.config.v1.IResourceCAIInfo=} [properties] Properties to set - * @returns {google.cloud.config.v1.ResourceCAIInfo} ResourceCAIInfo instance - */ - ResourceCAIInfo.create = function create(properties) { - return new ResourceCAIInfo(properties); - }; - - /** - * Encodes the specified ResourceCAIInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceCAIInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ResourceCAIInfo - * @static - * @param {google.cloud.config.v1.IResourceCAIInfo} message ResourceCAIInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceCAIInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fullResourceName != null && Object.hasOwnProperty.call(message, "fullResourceName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fullResourceName); - return writer; - }; - - /** - * Encodes the specified ResourceCAIInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceCAIInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ResourceCAIInfo - * @static - * @param {google.cloud.config.v1.IResourceCAIInfo} message ResourceCAIInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceCAIInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceCAIInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ResourceCAIInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ResourceCAIInfo} ResourceCAIInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceCAIInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceCAIInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fullResourceName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceCAIInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ResourceCAIInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ResourceCAIInfo} ResourceCAIInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceCAIInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceCAIInfo message. - * @function verify - * @memberof google.cloud.config.v1.ResourceCAIInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceCAIInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName")) - if (!$util.isString(message.fullResourceName)) - return "fullResourceName: string expected"; - return null; - }; - - /** - * Creates a ResourceCAIInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ResourceCAIInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ResourceCAIInfo} ResourceCAIInfo - */ - ResourceCAIInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ResourceCAIInfo) - return object; - var message = new $root.google.cloud.config.v1.ResourceCAIInfo(); - if (object.fullResourceName != null) - message.fullResourceName = String(object.fullResourceName); - return message; - }; - - /** - * Creates a plain object from a ResourceCAIInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ResourceCAIInfo - * @static - * @param {google.cloud.config.v1.ResourceCAIInfo} message ResourceCAIInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceCAIInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.fullResourceName = ""; - if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName")) - object.fullResourceName = message.fullResourceName; - return object; - }; - - /** - * Converts this ResourceCAIInfo to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ResourceCAIInfo - * @instance - * @returns {Object.} JSON object - */ - ResourceCAIInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceCAIInfo - * @function getTypeUrl - * @memberof google.cloud.config.v1.ResourceCAIInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceCAIInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ResourceCAIInfo"; - }; - - return ResourceCAIInfo; - })(); - - v1.GetResourceRequest = (function() { - - /** - * Properties of a GetResourceRequest. - * @memberof google.cloud.config.v1 - * @interface IGetResourceRequest - * @property {string|null} [name] GetResourceRequest name - */ - - /** - * Constructs a new GetResourceRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a GetResourceRequest. - * @implements IGetResourceRequest - * @constructor - * @param {google.cloud.config.v1.IGetResourceRequest=} [properties] Properties to set - */ - function GetResourceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetResourceRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.GetResourceRequest - * @instance - */ - GetResourceRequest.prototype.name = ""; - - /** - * Creates a new GetResourceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.GetResourceRequest - * @static - * @param {google.cloud.config.v1.IGetResourceRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.GetResourceRequest} GetResourceRequest instance - */ - GetResourceRequest.create = function create(properties) { - return new GetResourceRequest(properties); - }; - - /** - * Encodes the specified GetResourceRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.GetResourceRequest - * @static - * @param {google.cloud.config.v1.IGetResourceRequest} message GetResourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetResourceRequest.encode = function encode(message, writer) { - 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 GetResourceRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.GetResourceRequest - * @static - * @param {google.cloud.config.v1.IGetResourceRequest} message GetResourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetResourceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetResourceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.GetResourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.GetResourceRequest} GetResourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetResourceRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetResourceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetResourceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.GetResourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.GetResourceRequest} GetResourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetResourceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetResourceRequest message. - * @function verify - * @memberof google.cloud.config.v1.GetResourceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetResourceRequest.verify = function verify(message) { - if (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 GetResourceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.GetResourceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.GetResourceRequest} GetResourceRequest - */ - GetResourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.GetResourceRequest) - return object; - var message = new $root.google.cloud.config.v1.GetResourceRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetResourceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.GetResourceRequest - * @static - * @param {google.cloud.config.v1.GetResourceRequest} message GetResourceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetResourceRequest.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 GetResourceRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.GetResourceRequest - * @instance - * @returns {Object.} JSON object - */ - GetResourceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetResourceRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.GetResourceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetResourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.GetResourceRequest"; - }; - - return GetResourceRequest; - })(); - - v1.ListResourcesRequest = (function() { - - /** - * Properties of a ListResourcesRequest. - * @memberof google.cloud.config.v1 - * @interface IListResourcesRequest - * @property {string|null} [parent] ListResourcesRequest parent - * @property {number|null} [pageSize] ListResourcesRequest pageSize - * @property {string|null} [pageToken] ListResourcesRequest pageToken - * @property {string|null} [filter] ListResourcesRequest filter - * @property {string|null} [orderBy] ListResourcesRequest orderBy - */ - - /** - * Constructs a new ListResourcesRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListResourcesRequest. - * @implements IListResourcesRequest - * @constructor - * @param {google.cloud.config.v1.IListResourcesRequest=} [properties] Properties to set - */ - function ListResourcesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListResourcesRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.ListResourcesRequest - * @instance - */ - ListResourcesRequest.prototype.parent = ""; - - /** - * ListResourcesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.config.v1.ListResourcesRequest - * @instance - */ - ListResourcesRequest.prototype.pageSize = 0; - - /** - * ListResourcesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.config.v1.ListResourcesRequest - * @instance - */ - ListResourcesRequest.prototype.pageToken = ""; - - /** - * ListResourcesRequest filter. - * @member {string} filter - * @memberof google.cloud.config.v1.ListResourcesRequest - * @instance - */ - ListResourcesRequest.prototype.filter = ""; - - /** - * ListResourcesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.config.v1.ListResourcesRequest - * @instance - */ - ListResourcesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListResourcesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListResourcesRequest - * @static - * @param {google.cloud.config.v1.IListResourcesRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListResourcesRequest} ListResourcesRequest instance - */ - ListResourcesRequest.create = function create(properties) { - return new ListResourcesRequest(properties); - }; - - /** - * Encodes the specified ListResourcesRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourcesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListResourcesRequest - * @static - * @param {google.cloud.config.v1.IListResourcesRequest} message ListResourcesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourcesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourcesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListResourcesRequest - * @static - * @param {google.cloud.config.v1.IListResourcesRequest} message ListResourcesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListResourcesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListResourcesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListResourcesRequest} ListResourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourcesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourcesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListResourcesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListResourcesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListResourcesRequest} ListResourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourcesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListResourcesRequest message. - * @function verify - * @memberof google.cloud.config.v1.ListResourcesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListResourcesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListResourcesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListResourcesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListResourcesRequest} ListResourcesRequest - */ - ListResourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListResourcesRequest) - return object; - var message = new $root.google.cloud.config.v1.ListResourcesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListResourcesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListResourcesRequest - * @static - * @param {google.cloud.config.v1.ListResourcesRequest} message ListResourcesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListResourcesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListResourcesRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListResourcesRequest - * @instance - * @returns {Object.} JSON object - */ - ListResourcesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListResourcesRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListResourcesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListResourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListResourcesRequest"; - }; - - return ListResourcesRequest; - })(); - - v1.ListResourcesResponse = (function() { - - /** - * Properties of a ListResourcesResponse. - * @memberof google.cloud.config.v1 - * @interface IListResourcesResponse - * @property {Array.|null} [resources] ListResourcesResponse resources - * @property {string|null} [nextPageToken] ListResourcesResponse nextPageToken - * @property {Array.|null} [unreachable] ListResourcesResponse unreachable - */ - - /** - * Constructs a new ListResourcesResponse. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListResourcesResponse. - * @implements IListResourcesResponse - * @constructor - * @param {google.cloud.config.v1.IListResourcesResponse=} [properties] Properties to set - */ - function ListResourcesResponse(properties) { - this.resources = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListResourcesResponse resources. - * @member {Array.} resources - * @memberof google.cloud.config.v1.ListResourcesResponse - * @instance - */ - ListResourcesResponse.prototype.resources = $util.emptyArray; - - /** - * ListResourcesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.config.v1.ListResourcesResponse - * @instance - */ - ListResourcesResponse.prototype.nextPageToken = ""; - - /** - * ListResourcesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.config.v1.ListResourcesResponse - * @instance - */ - ListResourcesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListResourcesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListResourcesResponse - * @static - * @param {google.cloud.config.v1.IListResourcesResponse=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListResourcesResponse} ListResourcesResponse instance - */ - ListResourcesResponse.create = function create(properties) { - return new ListResourcesResponse(properties); - }; - - /** - * Encodes the specified ListResourcesResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourcesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListResourcesResponse - * @static - * @param {google.cloud.config.v1.IListResourcesResponse} message ListResourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourcesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resources != null && message.resources.length) - for (var i = 0; i < message.resources.length; ++i) - $root.google.cloud.config.v1.Resource.encode(message.resources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourcesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListResourcesResponse - * @static - * @param {google.cloud.config.v1.IListResourcesResponse} message ListResourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListResourcesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListResourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListResourcesResponse} ListResourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourcesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourcesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push($root.google.cloud.config.v1.Resource.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListResourcesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListResourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListResourcesResponse} ListResourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourcesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListResourcesResponse message. - * @function verify - * @memberof google.cloud.config.v1.ListResourcesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListResourcesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resources != null && message.hasOwnProperty("resources")) { - if (!Array.isArray(message.resources)) - return "resources: array expected"; - for (var i = 0; i < message.resources.length; ++i) { - var error = $root.google.cloud.config.v1.Resource.verify(message.resources[i]); - if (error) - return "resources." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListResourcesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListResourcesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListResourcesResponse} ListResourcesResponse - */ - ListResourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListResourcesResponse) - return object; - var message = new $root.google.cloud.config.v1.ListResourcesResponse(); - if (object.resources) { - if (!Array.isArray(object.resources)) - throw TypeError(".google.cloud.config.v1.ListResourcesResponse.resources: array expected"); - message.resources = []; - for (var i = 0; i < object.resources.length; ++i) { - if (typeof object.resources[i] !== "object") - throw TypeError(".google.cloud.config.v1.ListResourcesResponse.resources: object expected"); - message.resources[i] = $root.google.cloud.config.v1.Resource.fromObject(object.resources[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.config.v1.ListResourcesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListResourcesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListResourcesResponse - * @static - * @param {google.cloud.config.v1.ListResourcesResponse} message ListResourcesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListResourcesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resources = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.resources && message.resources.length) { - object.resources = []; - for (var j = 0; j < message.resources.length; ++j) - object.resources[j] = $root.google.cloud.config.v1.Resource.toObject(message.resources[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListResourcesResponse to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListResourcesResponse - * @instance - * @returns {Object.} JSON object - */ - ListResourcesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListResourcesResponse - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListResourcesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListResourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListResourcesResponse"; - }; - - return ListResourcesResponse; - })(); - - v1.Statefile = (function() { - - /** - * Properties of a Statefile. - * @memberof google.cloud.config.v1 - * @interface IStatefile - * @property {string|null} [signedUri] Statefile signedUri - */ - - /** - * Constructs a new Statefile. - * @memberof google.cloud.config.v1 - * @classdesc Represents a Statefile. - * @implements IStatefile - * @constructor - * @param {google.cloud.config.v1.IStatefile=} [properties] Properties to set - */ - function Statefile(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Statefile signedUri. - * @member {string} signedUri - * @memberof google.cloud.config.v1.Statefile - * @instance - */ - Statefile.prototype.signedUri = ""; - - /** - * Creates a new Statefile instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.Statefile - * @static - * @param {google.cloud.config.v1.IStatefile=} [properties] Properties to set - * @returns {google.cloud.config.v1.Statefile} Statefile instance - */ - Statefile.create = function create(properties) { - return new Statefile(properties); - }; - - /** - * Encodes the specified Statefile message. Does not implicitly {@link google.cloud.config.v1.Statefile.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.Statefile - * @static - * @param {google.cloud.config.v1.IStatefile} message Statefile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Statefile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signedUri != null && Object.hasOwnProperty.call(message, "signedUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.signedUri); - return writer; - }; - - /** - * Encodes the specified Statefile message, length delimited. Does not implicitly {@link google.cloud.config.v1.Statefile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.Statefile - * @static - * @param {google.cloud.config.v1.IStatefile} message Statefile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Statefile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Statefile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.Statefile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.Statefile} Statefile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Statefile.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.Statefile(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.signedUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Statefile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.Statefile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.Statefile} Statefile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Statefile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Statefile message. - * @function verify - * @memberof google.cloud.config.v1.Statefile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Statefile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signedUri != null && message.hasOwnProperty("signedUri")) - if (!$util.isString(message.signedUri)) - return "signedUri: string expected"; - return null; - }; - - /** - * Creates a Statefile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.Statefile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.Statefile} Statefile - */ - Statefile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.Statefile) - return object; - var message = new $root.google.cloud.config.v1.Statefile(); - if (object.signedUri != null) - message.signedUri = String(object.signedUri); - return message; - }; - - /** - * Creates a plain object from a Statefile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.Statefile - * @static - * @param {google.cloud.config.v1.Statefile} message Statefile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Statefile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.signedUri = ""; - if (message.signedUri != null && message.hasOwnProperty("signedUri")) - object.signedUri = message.signedUri; - return object; - }; - - /** - * Converts this Statefile to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.Statefile - * @instance - * @returns {Object.} JSON object - */ - Statefile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Statefile - * @function getTypeUrl - * @memberof google.cloud.config.v1.Statefile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Statefile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.Statefile"; - }; - - return Statefile; - })(); - - v1.ExportDeploymentStatefileRequest = (function() { - - /** - * Properties of an ExportDeploymentStatefileRequest. - * @memberof google.cloud.config.v1 - * @interface IExportDeploymentStatefileRequest - * @property {string|null} [parent] ExportDeploymentStatefileRequest parent - * @property {boolean|null} [draft] ExportDeploymentStatefileRequest draft - */ - - /** - * Constructs a new ExportDeploymentStatefileRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents an ExportDeploymentStatefileRequest. - * @implements IExportDeploymentStatefileRequest - * @constructor - * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest=} [properties] Properties to set - */ - function ExportDeploymentStatefileRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExportDeploymentStatefileRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @instance - */ - ExportDeploymentStatefileRequest.prototype.parent = ""; - - /** - * ExportDeploymentStatefileRequest draft. - * @member {boolean} draft - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @instance - */ - ExportDeploymentStatefileRequest.prototype.draft = false; - - /** - * Creates a new ExportDeploymentStatefileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @static - * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ExportDeploymentStatefileRequest} ExportDeploymentStatefileRequest instance - */ - ExportDeploymentStatefileRequest.create = function create(properties) { - return new ExportDeploymentStatefileRequest(properties); - }; - - /** - * Encodes the specified ExportDeploymentStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ExportDeploymentStatefileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @static - * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest} message ExportDeploymentStatefileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportDeploymentStatefileRequest.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.draft != null && Object.hasOwnProperty.call(message, "draft")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.draft); - return writer; - }; - - /** - * Encodes the specified ExportDeploymentStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportDeploymentStatefileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @static - * @param {google.cloud.config.v1.IExportDeploymentStatefileRequest} message ExportDeploymentStatefileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportDeploymentStatefileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportDeploymentStatefileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ExportDeploymentStatefileRequest} ExportDeploymentStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportDeploymentStatefileRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ExportDeploymentStatefileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.draft = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportDeploymentStatefileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ExportDeploymentStatefileRequest} ExportDeploymentStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportDeploymentStatefileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportDeploymentStatefileRequest message. - * @function verify - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportDeploymentStatefileRequest.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.draft != null && message.hasOwnProperty("draft")) - if (typeof message.draft !== "boolean") - return "draft: boolean expected"; - return null; - }; - - /** - * Creates an ExportDeploymentStatefileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ExportDeploymentStatefileRequest} ExportDeploymentStatefileRequest - */ - ExportDeploymentStatefileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ExportDeploymentStatefileRequest) - return object; - var message = new $root.google.cloud.config.v1.ExportDeploymentStatefileRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.draft != null) - message.draft = Boolean(object.draft); - return message; - }; - - /** - * Creates a plain object from an ExportDeploymentStatefileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @static - * @param {google.cloud.config.v1.ExportDeploymentStatefileRequest} message ExportDeploymentStatefileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportDeploymentStatefileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.draft = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.draft != null && message.hasOwnProperty("draft")) - object.draft = message.draft; - return object; - }; - - /** - * Converts this ExportDeploymentStatefileRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @instance - * @returns {Object.} JSON object - */ - ExportDeploymentStatefileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportDeploymentStatefileRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ExportDeploymentStatefileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportDeploymentStatefileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ExportDeploymentStatefileRequest"; - }; - - return ExportDeploymentStatefileRequest; - })(); - - v1.ExportRevisionStatefileRequest = (function() { - - /** - * Properties of an ExportRevisionStatefileRequest. - * @memberof google.cloud.config.v1 - * @interface IExportRevisionStatefileRequest - * @property {string|null} [parent] ExportRevisionStatefileRequest parent - */ - - /** - * Constructs a new ExportRevisionStatefileRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents an ExportRevisionStatefileRequest. - * @implements IExportRevisionStatefileRequest - * @constructor - * @param {google.cloud.config.v1.IExportRevisionStatefileRequest=} [properties] Properties to set - */ - function ExportRevisionStatefileRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExportRevisionStatefileRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest - * @instance - */ - ExportRevisionStatefileRequest.prototype.parent = ""; - - /** - * Creates a new ExportRevisionStatefileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest - * @static - * @param {google.cloud.config.v1.IExportRevisionStatefileRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ExportRevisionStatefileRequest} ExportRevisionStatefileRequest instance - */ - ExportRevisionStatefileRequest.create = function create(properties) { - return new ExportRevisionStatefileRequest(properties); - }; - - /** - * Encodes the specified ExportRevisionStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ExportRevisionStatefileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest - * @static - * @param {google.cloud.config.v1.IExportRevisionStatefileRequest} message ExportRevisionStatefileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportRevisionStatefileRequest.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); - return writer; - }; - - /** - * Encodes the specified ExportRevisionStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportRevisionStatefileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest - * @static - * @param {google.cloud.config.v1.IExportRevisionStatefileRequest} message ExportRevisionStatefileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportRevisionStatefileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportRevisionStatefileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ExportRevisionStatefileRequest} ExportRevisionStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportRevisionStatefileRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ExportRevisionStatefileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportRevisionStatefileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ExportRevisionStatefileRequest} ExportRevisionStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportRevisionStatefileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportRevisionStatefileRequest message. - * @function verify - * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportRevisionStatefileRequest.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"; - return null; - }; - - /** - * Creates an ExportRevisionStatefileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ExportRevisionStatefileRequest} ExportRevisionStatefileRequest - */ - ExportRevisionStatefileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ExportRevisionStatefileRequest) - return object; - var message = new $root.google.cloud.config.v1.ExportRevisionStatefileRequest(); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from an ExportRevisionStatefileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest - * @static - * @param {google.cloud.config.v1.ExportRevisionStatefileRequest} message ExportRevisionStatefileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportRevisionStatefileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this ExportRevisionStatefileRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest - * @instance - * @returns {Object.} JSON object - */ - ExportRevisionStatefileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportRevisionStatefileRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ExportRevisionStatefileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportRevisionStatefileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ExportRevisionStatefileRequest"; - }; - - return ExportRevisionStatefileRequest; - })(); - - v1.ImportStatefileRequest = (function() { - - /** - * Properties of an ImportStatefileRequest. - * @memberof google.cloud.config.v1 - * @interface IImportStatefileRequest - * @property {string|null} [parent] ImportStatefileRequest parent - * @property {number|Long|null} [lockId] ImportStatefileRequest lockId - * @property {boolean|null} [skipDraft] ImportStatefileRequest skipDraft - */ - - /** - * Constructs a new ImportStatefileRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents an ImportStatefileRequest. - * @implements IImportStatefileRequest - * @constructor - * @param {google.cloud.config.v1.IImportStatefileRequest=} [properties] Properties to set - */ - function ImportStatefileRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportStatefileRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @instance - */ - ImportStatefileRequest.prototype.parent = ""; - - /** - * ImportStatefileRequest lockId. - * @member {number|Long} lockId - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @instance - */ - ImportStatefileRequest.prototype.lockId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImportStatefileRequest skipDraft. - * @member {boolean} skipDraft - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @instance - */ - ImportStatefileRequest.prototype.skipDraft = false; - - /** - * Creates a new ImportStatefileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @static - * @param {google.cloud.config.v1.IImportStatefileRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ImportStatefileRequest} ImportStatefileRequest instance - */ - ImportStatefileRequest.create = function create(properties) { - return new ImportStatefileRequest(properties); - }; - - /** - * Encodes the specified ImportStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.ImportStatefileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @static - * @param {google.cloud.config.v1.IImportStatefileRequest} message ImportStatefileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportStatefileRequest.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.lockId != null && Object.hasOwnProperty.call(message, "lockId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lockId); - if (message.skipDraft != null && Object.hasOwnProperty.call(message, "skipDraft")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.skipDraft); - return writer; - }; - - /** - * Encodes the specified ImportStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ImportStatefileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @static - * @param {google.cloud.config.v1.IImportStatefileRequest} message ImportStatefileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportStatefileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportStatefileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ImportStatefileRequest} ImportStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportStatefileRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ImportStatefileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.lockId = reader.int64(); - break; - } - case 3: { - message.skipDraft = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportStatefileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ImportStatefileRequest} ImportStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportStatefileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportStatefileRequest message. - * @function verify - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportStatefileRequest.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.lockId != null && message.hasOwnProperty("lockId")) - if (!$util.isInteger(message.lockId) && !(message.lockId && $util.isInteger(message.lockId.low) && $util.isInteger(message.lockId.high))) - return "lockId: integer|Long expected"; - if (message.skipDraft != null && message.hasOwnProperty("skipDraft")) - if (typeof message.skipDraft !== "boolean") - return "skipDraft: boolean expected"; - return null; - }; - - /** - * Creates an ImportStatefileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ImportStatefileRequest} ImportStatefileRequest - */ - ImportStatefileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ImportStatefileRequest) - return object; - var message = new $root.google.cloud.config.v1.ImportStatefileRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.lockId != null) - if ($util.Long) - (message.lockId = $util.Long.fromValue(object.lockId)).unsigned = false; - else if (typeof object.lockId === "string") - message.lockId = parseInt(object.lockId, 10); - else if (typeof object.lockId === "number") - message.lockId = object.lockId; - else if (typeof object.lockId === "object") - message.lockId = new $util.LongBits(object.lockId.low >>> 0, object.lockId.high >>> 0).toNumber(); - if (object.skipDraft != null) - message.skipDraft = Boolean(object.skipDraft); - return message; - }; - - /** - * Creates a plain object from an ImportStatefileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @static - * @param {google.cloud.config.v1.ImportStatefileRequest} message ImportStatefileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportStatefileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lockId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lockId = options.longs === String ? "0" : 0; - object.skipDraft = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.lockId != null && message.hasOwnProperty("lockId")) - if (typeof message.lockId === "number") - object.lockId = options.longs === String ? String(message.lockId) : message.lockId; - else - object.lockId = options.longs === String ? $util.Long.prototype.toString.call(message.lockId) : options.longs === Number ? new $util.LongBits(message.lockId.low >>> 0, message.lockId.high >>> 0).toNumber() : message.lockId; - if (message.skipDraft != null && message.hasOwnProperty("skipDraft")) - object.skipDraft = message.skipDraft; - return object; - }; - - /** - * Converts this ImportStatefileRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @instance - * @returns {Object.} JSON object - */ - ImportStatefileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportStatefileRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ImportStatefileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportStatefileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ImportStatefileRequest"; - }; - - return ImportStatefileRequest; - })(); - - v1.DeleteStatefileRequest = (function() { - - /** - * Properties of a DeleteStatefileRequest. - * @memberof google.cloud.config.v1 - * @interface IDeleteStatefileRequest - * @property {string|null} [name] DeleteStatefileRequest name - * @property {number|Long|null} [lockId] DeleteStatefileRequest lockId - */ - - /** - * Constructs a new DeleteStatefileRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a DeleteStatefileRequest. - * @implements IDeleteStatefileRequest - * @constructor - * @param {google.cloud.config.v1.IDeleteStatefileRequest=} [properties] Properties to set - */ - function DeleteStatefileRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteStatefileRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @instance - */ - DeleteStatefileRequest.prototype.name = ""; - - /** - * DeleteStatefileRequest lockId. - * @member {number|Long} lockId - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @instance - */ - DeleteStatefileRequest.prototype.lockId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new DeleteStatefileRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @static - * @param {google.cloud.config.v1.IDeleteStatefileRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.DeleteStatefileRequest} DeleteStatefileRequest instance - */ - DeleteStatefileRequest.create = function create(properties) { - return new DeleteStatefileRequest(properties); - }; - - /** - * Encodes the specified DeleteStatefileRequest message. Does not implicitly {@link google.cloud.config.v1.DeleteStatefileRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @static - * @param {google.cloud.config.v1.IDeleteStatefileRequest} message DeleteStatefileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteStatefileRequest.encode = function encode(message, writer) { - 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.lockId != null && Object.hasOwnProperty.call(message, "lockId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lockId); - return writer; - }; - - /** - * Encodes the specified DeleteStatefileRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeleteStatefileRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @static - * @param {google.cloud.config.v1.IDeleteStatefileRequest} message DeleteStatefileRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteStatefileRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteStatefileRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.DeleteStatefileRequest} DeleteStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteStatefileRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.DeleteStatefileRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.lockId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteStatefileRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.DeleteStatefileRequest} DeleteStatefileRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteStatefileRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteStatefileRequest message. - * @function verify - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteStatefileRequest.verify = function verify(message) { - if (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.lockId != null && message.hasOwnProperty("lockId")) - if (!$util.isInteger(message.lockId) && !(message.lockId && $util.isInteger(message.lockId.low) && $util.isInteger(message.lockId.high))) - return "lockId: integer|Long expected"; - return null; - }; - - /** - * Creates a DeleteStatefileRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.DeleteStatefileRequest} DeleteStatefileRequest - */ - DeleteStatefileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.DeleteStatefileRequest) - return object; - var message = new $root.google.cloud.config.v1.DeleteStatefileRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.lockId != null) - if ($util.Long) - (message.lockId = $util.Long.fromValue(object.lockId)).unsigned = false; - else if (typeof object.lockId === "string") - message.lockId = parseInt(object.lockId, 10); - else if (typeof object.lockId === "number") - message.lockId = object.lockId; - else if (typeof object.lockId === "object") - message.lockId = new $util.LongBits(object.lockId.low >>> 0, object.lockId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a DeleteStatefileRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @static - * @param {google.cloud.config.v1.DeleteStatefileRequest} message DeleteStatefileRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteStatefileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lockId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lockId = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.lockId != null && message.hasOwnProperty("lockId")) - if (typeof message.lockId === "number") - object.lockId = options.longs === String ? String(message.lockId) : message.lockId; - else - object.lockId = options.longs === String ? $util.Long.prototype.toString.call(message.lockId) : options.longs === Number ? new $util.LongBits(message.lockId.low >>> 0, message.lockId.high >>> 0).toNumber() : message.lockId; - return object; - }; - - /** - * Converts this DeleteStatefileRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteStatefileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteStatefileRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.DeleteStatefileRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteStatefileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.DeleteStatefileRequest"; - }; - - return DeleteStatefileRequest; - })(); - - v1.LockDeploymentRequest = (function() { - - /** - * Properties of a LockDeploymentRequest. - * @memberof google.cloud.config.v1 - * @interface ILockDeploymentRequest - * @property {string|null} [name] LockDeploymentRequest name - */ - - /** - * Constructs a new LockDeploymentRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a LockDeploymentRequest. - * @implements ILockDeploymentRequest - * @constructor - * @param {google.cloud.config.v1.ILockDeploymentRequest=} [properties] Properties to set - */ - function LockDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LockDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.LockDeploymentRequest - * @instance - */ - LockDeploymentRequest.prototype.name = ""; - - /** - * Creates a new LockDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.LockDeploymentRequest - * @static - * @param {google.cloud.config.v1.ILockDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.LockDeploymentRequest} LockDeploymentRequest instance - */ - LockDeploymentRequest.create = function create(properties) { - return new LockDeploymentRequest(properties); - }; - - /** - * Encodes the specified LockDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.LockDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.LockDeploymentRequest - * @static - * @param {google.cloud.config.v1.ILockDeploymentRequest} message LockDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LockDeploymentRequest.encode = function encode(message, writer) { - 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 LockDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.LockDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.LockDeploymentRequest - * @static - * @param {google.cloud.config.v1.ILockDeploymentRequest} message LockDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LockDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LockDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.LockDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.LockDeploymentRequest} LockDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LockDeploymentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.LockDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LockDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.LockDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.LockDeploymentRequest} LockDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LockDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LockDeploymentRequest message. - * @function verify - * @memberof google.cloud.config.v1.LockDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LockDeploymentRequest.verify = function verify(message) { - if (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 LockDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.LockDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.LockDeploymentRequest} LockDeploymentRequest - */ - LockDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.LockDeploymentRequest) - return object; - var message = new $root.google.cloud.config.v1.LockDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a LockDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.LockDeploymentRequest - * @static - * @param {google.cloud.config.v1.LockDeploymentRequest} message LockDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LockDeploymentRequest.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 LockDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.LockDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - LockDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LockDeploymentRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.LockDeploymentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LockDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.LockDeploymentRequest"; - }; - - return LockDeploymentRequest; - })(); - - v1.UnlockDeploymentRequest = (function() { - - /** - * Properties of an UnlockDeploymentRequest. - * @memberof google.cloud.config.v1 - * @interface IUnlockDeploymentRequest - * @property {string|null} [name] UnlockDeploymentRequest name - * @property {number|Long|null} [lockId] UnlockDeploymentRequest lockId - */ - - /** - * Constructs a new UnlockDeploymentRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents an UnlockDeploymentRequest. - * @implements IUnlockDeploymentRequest - * @constructor - * @param {google.cloud.config.v1.IUnlockDeploymentRequest=} [properties] Properties to set - */ - function UnlockDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UnlockDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @instance - */ - UnlockDeploymentRequest.prototype.name = ""; - - /** - * UnlockDeploymentRequest lockId. - * @member {number|Long} lockId - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @instance - */ - UnlockDeploymentRequest.prototype.lockId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new UnlockDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @static - * @param {google.cloud.config.v1.IUnlockDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.UnlockDeploymentRequest} UnlockDeploymentRequest instance - */ - UnlockDeploymentRequest.create = function create(properties) { - return new UnlockDeploymentRequest(properties); - }; - - /** - * Encodes the specified UnlockDeploymentRequest message. Does not implicitly {@link google.cloud.config.v1.UnlockDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @static - * @param {google.cloud.config.v1.IUnlockDeploymentRequest} message UnlockDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnlockDeploymentRequest.encode = function encode(message, writer) { - 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.lockId != null && Object.hasOwnProperty.call(message, "lockId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lockId); - return writer; - }; - - /** - * Encodes the specified UnlockDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UnlockDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @static - * @param {google.cloud.config.v1.IUnlockDeploymentRequest} message UnlockDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnlockDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UnlockDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.UnlockDeploymentRequest} UnlockDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnlockDeploymentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.UnlockDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.lockId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UnlockDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.UnlockDeploymentRequest} UnlockDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnlockDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UnlockDeploymentRequest message. - * @function verify - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnlockDeploymentRequest.verify = function verify(message) { - if (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.lockId != null && message.hasOwnProperty("lockId")) - if (!$util.isInteger(message.lockId) && !(message.lockId && $util.isInteger(message.lockId.low) && $util.isInteger(message.lockId.high))) - return "lockId: integer|Long expected"; - return null; - }; - - /** - * Creates an UnlockDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.UnlockDeploymentRequest} UnlockDeploymentRequest - */ - UnlockDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.UnlockDeploymentRequest) - return object; - var message = new $root.google.cloud.config.v1.UnlockDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.lockId != null) - if ($util.Long) - (message.lockId = $util.Long.fromValue(object.lockId)).unsigned = false; - else if (typeof object.lockId === "string") - message.lockId = parseInt(object.lockId, 10); - else if (typeof object.lockId === "number") - message.lockId = object.lockId; - else if (typeof object.lockId === "object") - message.lockId = new $util.LongBits(object.lockId.low >>> 0, object.lockId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an UnlockDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @static - * @param {google.cloud.config.v1.UnlockDeploymentRequest} message UnlockDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnlockDeploymentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lockId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lockId = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.lockId != null && message.hasOwnProperty("lockId")) - if (typeof message.lockId === "number") - object.lockId = options.longs === String ? String(message.lockId) : message.lockId; - else - object.lockId = options.longs === String ? $util.Long.prototype.toString.call(message.lockId) : options.longs === Number ? new $util.LongBits(message.lockId.low >>> 0, message.lockId.high >>> 0).toNumber() : message.lockId; - return object; - }; - - /** - * Converts this UnlockDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - UnlockDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UnlockDeploymentRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.UnlockDeploymentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UnlockDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.UnlockDeploymentRequest"; - }; - - return UnlockDeploymentRequest; - })(); - - v1.ExportLockInfoRequest = (function() { - - /** - * Properties of an ExportLockInfoRequest. - * @memberof google.cloud.config.v1 - * @interface IExportLockInfoRequest - * @property {string|null} [name] ExportLockInfoRequest name - */ - - /** - * Constructs a new ExportLockInfoRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents an ExportLockInfoRequest. - * @implements IExportLockInfoRequest - * @constructor - * @param {google.cloud.config.v1.IExportLockInfoRequest=} [properties] Properties to set - */ - function ExportLockInfoRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExportLockInfoRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.ExportLockInfoRequest - * @instance - */ - ExportLockInfoRequest.prototype.name = ""; - - /** - * Creates a new ExportLockInfoRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ExportLockInfoRequest - * @static - * @param {google.cloud.config.v1.IExportLockInfoRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ExportLockInfoRequest} ExportLockInfoRequest instance - */ - ExportLockInfoRequest.create = function create(properties) { - return new ExportLockInfoRequest(properties); - }; - - /** - * Encodes the specified ExportLockInfoRequest message. Does not implicitly {@link google.cloud.config.v1.ExportLockInfoRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ExportLockInfoRequest - * @static - * @param {google.cloud.config.v1.IExportLockInfoRequest} message ExportLockInfoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportLockInfoRequest.encode = function encode(message, writer) { - 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 ExportLockInfoRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportLockInfoRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ExportLockInfoRequest - * @static - * @param {google.cloud.config.v1.IExportLockInfoRequest} message ExportLockInfoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportLockInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportLockInfoRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ExportLockInfoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ExportLockInfoRequest} ExportLockInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportLockInfoRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ExportLockInfoRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportLockInfoRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ExportLockInfoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ExportLockInfoRequest} ExportLockInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportLockInfoRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportLockInfoRequest message. - * @function verify - * @memberof google.cloud.config.v1.ExportLockInfoRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportLockInfoRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates an ExportLockInfoRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ExportLockInfoRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ExportLockInfoRequest} ExportLockInfoRequest - */ - ExportLockInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ExportLockInfoRequest) - return object; - var message = new $root.google.cloud.config.v1.ExportLockInfoRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from an ExportLockInfoRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ExportLockInfoRequest - * @static - * @param {google.cloud.config.v1.ExportLockInfoRequest} message ExportLockInfoRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportLockInfoRequest.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 ExportLockInfoRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ExportLockInfoRequest - * @instance - * @returns {Object.} JSON object - */ - ExportLockInfoRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportLockInfoRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ExportLockInfoRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportLockInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ExportLockInfoRequest"; - }; - - return ExportLockInfoRequest; - })(); - - v1.LockInfo = (function() { - - /** - * Properties of a LockInfo. - * @memberof google.cloud.config.v1 - * @interface ILockInfo - * @property {number|Long|null} [lockId] LockInfo lockId - * @property {string|null} [operation] LockInfo operation - * @property {string|null} [info] LockInfo info - * @property {string|null} [who] LockInfo who - * @property {string|null} [version] LockInfo version - * @property {google.protobuf.ITimestamp|null} [createTime] LockInfo createTime - */ - - /** - * Constructs a new LockInfo. - * @memberof google.cloud.config.v1 - * @classdesc Represents a LockInfo. - * @implements ILockInfo - * @constructor - * @param {google.cloud.config.v1.ILockInfo=} [properties] Properties to set - */ - function LockInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LockInfo lockId. - * @member {number|Long} lockId - * @memberof google.cloud.config.v1.LockInfo - * @instance - */ - LockInfo.prototype.lockId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * LockInfo operation. - * @member {string} operation - * @memberof google.cloud.config.v1.LockInfo - * @instance - */ - LockInfo.prototype.operation = ""; - - /** - * LockInfo info. - * @member {string} info - * @memberof google.cloud.config.v1.LockInfo - * @instance - */ - LockInfo.prototype.info = ""; - - /** - * LockInfo who. - * @member {string} who - * @memberof google.cloud.config.v1.LockInfo - * @instance - */ - LockInfo.prototype.who = ""; - - /** - * LockInfo version. - * @member {string} version - * @memberof google.cloud.config.v1.LockInfo - * @instance - */ - LockInfo.prototype.version = ""; - - /** - * LockInfo createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.config.v1.LockInfo - * @instance - */ - LockInfo.prototype.createTime = null; - - /** - * Creates a new LockInfo instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.LockInfo - * @static - * @param {google.cloud.config.v1.ILockInfo=} [properties] Properties to set - * @returns {google.cloud.config.v1.LockInfo} LockInfo instance - */ - LockInfo.create = function create(properties) { - return new LockInfo(properties); - }; - - /** - * Encodes the specified LockInfo message. Does not implicitly {@link google.cloud.config.v1.LockInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.LockInfo - * @static - * @param {google.cloud.config.v1.ILockInfo} message LockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LockInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lockId != null && Object.hasOwnProperty.call(message, "lockId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.lockId); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.operation); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.info); - if (message.who != null && Object.hasOwnProperty.call(message, "who")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.who); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LockInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.LockInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.LockInfo - * @static - * @param {google.cloud.config.v1.ILockInfo} message LockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LockInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LockInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.LockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.LockInfo} LockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LockInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.LockInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.lockId = reader.int64(); - break; - } - case 2: { - message.operation = reader.string(); - break; - } - case 3: { - message.info = reader.string(); - break; - } - case 4: { - message.who = reader.string(); - break; - } - case 5: { - message.version = reader.string(); - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LockInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.LockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.LockInfo} LockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LockInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LockInfo message. - * @function verify - * @memberof google.cloud.config.v1.LockInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LockInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lockId != null && message.hasOwnProperty("lockId")) - if (!$util.isInteger(message.lockId) && !(message.lockId && $util.isInteger(message.lockId.low) && $util.isInteger(message.lockId.high))) - return "lockId: integer|Long expected"; - if (message.operation != null && message.hasOwnProperty("operation")) - if (!$util.isString(message.operation)) - return "operation: string expected"; - if (message.info != null && message.hasOwnProperty("info")) - if (!$util.isString(message.info)) - return "info: string expected"; - if (message.who != null && message.hasOwnProperty("who")) - if (!$util.isString(message.who)) - return "who: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - return null; - }; - - /** - * Creates a LockInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.LockInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.LockInfo} LockInfo - */ - LockInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.LockInfo) - return object; - var message = new $root.google.cloud.config.v1.LockInfo(); - if (object.lockId != null) - if ($util.Long) - (message.lockId = $util.Long.fromValue(object.lockId)).unsigned = false; - else if (typeof object.lockId === "string") - message.lockId = parseInt(object.lockId, 10); - else if (typeof object.lockId === "number") - message.lockId = object.lockId; - else if (typeof object.lockId === "object") - message.lockId = new $util.LongBits(object.lockId.low >>> 0, object.lockId.high >>> 0).toNumber(); - if (object.operation != null) - message.operation = String(object.operation); - if (object.info != null) - message.info = String(object.info); - if (object.who != null) - message.who = String(object.who); - if (object.version != null) - message.version = String(object.version); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.config.v1.LockInfo.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - return message; - }; - - /** - * Creates a plain object from a LockInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.LockInfo - * @static - * @param {google.cloud.config.v1.LockInfo} message LockInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LockInfo.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.lockId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lockId = options.longs === String ? "0" : 0; - object.operation = ""; - object.info = ""; - object.who = ""; - object.version = ""; - object.createTime = null; - } - if (message.lockId != null && message.hasOwnProperty("lockId")) - if (typeof message.lockId === "number") - object.lockId = options.longs === String ? String(message.lockId) : message.lockId; - else - object.lockId = options.longs === String ? $util.Long.prototype.toString.call(message.lockId) : options.longs === Number ? new $util.LongBits(message.lockId.low >>> 0, message.lockId.high >>> 0).toNumber() : message.lockId; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = message.operation; - if (message.info != null && message.hasOwnProperty("info")) - object.info = message.info; - if (message.who != null && message.hasOwnProperty("who")) - object.who = message.who; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - return object; - }; - - /** - * Converts this LockInfo to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.LockInfo - * @instance - * @returns {Object.} JSON object - */ - LockInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LockInfo - * @function getTypeUrl - * @memberof google.cloud.config.v1.LockInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.LockInfo"; - }; - - return LockInfo; - })(); - - v1.Preview = (function() { - - /** - * Properties of a Preview. - * @memberof google.cloud.config.v1 - * @interface IPreview - * @property {google.cloud.config.v1.ITerraformBlueprint|null} [terraformBlueprint] Preview terraformBlueprint - * @property {string|null} [name] Preview name - * @property {google.protobuf.ITimestamp|null} [createTime] Preview createTime - * @property {Object.|null} [labels] Preview labels - * @property {google.cloud.config.v1.Preview.State|null} [state] Preview state - * @property {string|null} [deployment] Preview deployment - * @property {google.cloud.config.v1.Preview.PreviewMode|null} [previewMode] Preview previewMode - * @property {string|null} [serviceAccount] Preview serviceAccount - * @property {string|null} [artifactsGcsBucket] Preview artifactsGcsBucket - * @property {string|null} [workerPool] Preview workerPool - * @property {google.cloud.config.v1.Preview.ErrorCode|null} [errorCode] Preview errorCode - * @property {google.rpc.IStatus|null} [errorStatus] Preview errorStatus - * @property {string|null} [build] Preview build - * @property {Array.|null} [tfErrors] Preview tfErrors - * @property {string|null} [errorLogs] Preview errorLogs - * @property {google.cloud.config.v1.IPreviewArtifacts|null} [previewArtifacts] Preview previewArtifacts - * @property {string|null} [logs] Preview logs - * @property {string|null} [tfVersion] Preview tfVersion - * @property {string|null} [tfVersionConstraint] Preview tfVersionConstraint - * @property {Object.|null} [annotations] Preview annotations - * @property {google.cloud.config.v1.IProviderConfig|null} [providerConfig] Preview providerConfig - */ - - /** - * Constructs a new Preview. - * @memberof google.cloud.config.v1 - * @classdesc Represents a Preview. - * @implements IPreview - * @constructor - * @param {google.cloud.config.v1.IPreview=} [properties] Properties to set - */ - function Preview(properties) { - this.labels = {}; - this.tfErrors = []; - this.annotations = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Preview terraformBlueprint. - * @member {google.cloud.config.v1.ITerraformBlueprint|null|undefined} terraformBlueprint - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.terraformBlueprint = null; - - /** - * Preview name. - * @member {string} name - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.name = ""; - - /** - * Preview createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.createTime = null; - - /** - * Preview labels. - * @member {Object.} labels - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.labels = $util.emptyObject; - - /** - * Preview state. - * @member {google.cloud.config.v1.Preview.State} state - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.state = 0; - - /** - * Preview deployment. - * @member {string} deployment - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.deployment = ""; - - /** - * Preview previewMode. - * @member {google.cloud.config.v1.Preview.PreviewMode} previewMode - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.previewMode = 0; - - /** - * Preview serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.serviceAccount = ""; - - /** - * Preview artifactsGcsBucket. - * @member {string|null|undefined} artifactsGcsBucket - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.artifactsGcsBucket = null; - - /** - * Preview workerPool. - * @member {string|null|undefined} workerPool - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.workerPool = null; - - /** - * Preview errorCode. - * @member {google.cloud.config.v1.Preview.ErrorCode} errorCode - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.errorCode = 0; - - /** - * Preview errorStatus. - * @member {google.rpc.IStatus|null|undefined} errorStatus - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.errorStatus = null; - - /** - * Preview build. - * @member {string} build - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.build = ""; - - /** - * Preview tfErrors. - * @member {Array.} tfErrors - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.tfErrors = $util.emptyArray; - - /** - * Preview errorLogs. - * @member {string} errorLogs - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.errorLogs = ""; - - /** - * Preview previewArtifacts. - * @member {google.cloud.config.v1.IPreviewArtifacts|null|undefined} previewArtifacts - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.previewArtifacts = null; - - /** - * Preview logs. - * @member {string} logs - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.logs = ""; - - /** - * Preview tfVersion. - * @member {string} tfVersion - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.tfVersion = ""; - - /** - * Preview tfVersionConstraint. - * @member {string|null|undefined} tfVersionConstraint - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.tfVersionConstraint = null; - - /** - * Preview annotations. - * @member {Object.} annotations - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.annotations = $util.emptyObject; - - /** - * Preview providerConfig. - * @member {google.cloud.config.v1.IProviderConfig|null|undefined} providerConfig - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Preview.prototype.providerConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Preview blueprint. - * @member {"terraformBlueprint"|undefined} blueprint - * @memberof google.cloud.config.v1.Preview - * @instance - */ - Object.defineProperty(Preview.prototype, "blueprint", { - get: $util.oneOfGetter($oneOfFields = ["terraformBlueprint"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Preview.prototype, "_artifactsGcsBucket", { - get: $util.oneOfGetter($oneOfFields = ["artifactsGcsBucket"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Preview.prototype, "_workerPool", { - get: $util.oneOfGetter($oneOfFields = ["workerPool"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Preview.prototype, "_tfVersionConstraint", { - get: $util.oneOfGetter($oneOfFields = ["tfVersionConstraint"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Preview instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.Preview - * @static - * @param {google.cloud.config.v1.IPreview=} [properties] Properties to set - * @returns {google.cloud.config.v1.Preview} Preview instance - */ - Preview.create = function create(properties) { - return new Preview(properties); - }; - - /** - * Encodes the specified Preview message. Does not implicitly {@link google.cloud.config.v1.Preview.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.Preview - * @static - * @param {google.cloud.config.v1.IPreview} message Preview message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Preview.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.deployment); - if (message.terraformBlueprint != null && Object.hasOwnProperty.call(message, "terraformBlueprint")) - $root.google.cloud.config.v1.TerraformBlueprint.encode(message.terraformBlueprint, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccount); - if (message.artifactsGcsBucket != null && Object.hasOwnProperty.call(message, "artifactsGcsBucket")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.artifactsGcsBucket); - if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.workerPool); - if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.errorCode); - if (message.errorStatus != null && Object.hasOwnProperty.call(message, "errorStatus")) - $root.google.rpc.Status.encode(message.errorStatus, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.build); - if (message.tfErrors != null && message.tfErrors.length) - for (var i = 0; i < message.tfErrors.length; ++i) - $root.google.cloud.config.v1.TerraformError.encode(message.tfErrors[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.errorLogs != null && Object.hasOwnProperty.call(message, "errorLogs")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.errorLogs); - if (message.previewMode != null && Object.hasOwnProperty.call(message, "previewMode")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.previewMode); - if (message.previewArtifacts != null && Object.hasOwnProperty.call(message, "previewArtifacts")) - $root.google.cloud.config.v1.PreviewArtifacts.encode(message.previewArtifacts, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.logs != null && Object.hasOwnProperty.call(message, "logs")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.logs); - if (message.tfVersion != null && Object.hasOwnProperty.call(message, "tfVersion")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.tfVersion); - if (message.tfVersionConstraint != null && Object.hasOwnProperty.call(message, "tfVersionConstraint")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.tfVersionConstraint); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.providerConfig != null && Object.hasOwnProperty.call(message, "providerConfig")) - $root.google.cloud.config.v1.ProviderConfig.encode(message.providerConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Preview message, length delimited. Does not implicitly {@link google.cloud.config.v1.Preview.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.Preview - * @static - * @param {google.cloud.config.v1.IPreview} message Preview message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Preview.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Preview message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.Preview - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.Preview} Preview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Preview.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.Preview(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 6: { - message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.decode(reader, reader.uint32()); - break; - } - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 4: { - message.state = reader.int32(); - break; - } - case 5: { - message.deployment = reader.string(); - break; - } - case 15: { - message.previewMode = reader.int32(); - break; - } - case 7: { - message.serviceAccount = reader.string(); - break; - } - case 8: { - message.artifactsGcsBucket = reader.string(); - break; - } - case 9: { - message.workerPool = reader.string(); - break; - } - case 10: { - message.errorCode = reader.int32(); - break; - } - case 11: { - message.errorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 12: { - message.build = reader.string(); - break; - } - case 13: { - if (!(message.tfErrors && message.tfErrors.length)) - message.tfErrors = []; - message.tfErrors.push($root.google.cloud.config.v1.TerraformError.decode(reader, reader.uint32())); - break; - } - case 14: { - message.errorLogs = reader.string(); - break; - } - case 16: { - message.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.decode(reader, reader.uint32()); - break; - } - case 17: { - message.logs = reader.string(); - break; - } - case 18: { - message.tfVersion = reader.string(); - break; - } - case 19: { - message.tfVersionConstraint = reader.string(); - break; - } - case 20: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.annotations[key] = value; - break; - } - case 21: { - message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Preview message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.Preview - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.Preview} Preview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Preview.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Preview message. - * @function verify - * @memberof google.cloud.config.v1.Preview - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Preview.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { - properties.blueprint = 1; - { - var error = $root.google.cloud.config.v1.TerraformBlueprint.verify(message.terraformBlueprint); - if (error) - return "terraformBlueprint." + error; - } - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.deployment != null && message.hasOwnProperty("deployment")) - if (!$util.isString(message.deployment)) - return "deployment: string expected"; - if (message.previewMode != null && message.hasOwnProperty("previewMode")) - switch (message.previewMode) { - default: - return "previewMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.artifactsGcsBucket != null && message.hasOwnProperty("artifactsGcsBucket")) { - properties._artifactsGcsBucket = 1; - if (!$util.isString(message.artifactsGcsBucket)) - return "artifactsGcsBucket: string expected"; - } - if (message.workerPool != null && message.hasOwnProperty("workerPool")) { - properties._workerPool = 1; - if (!$util.isString(message.workerPool)) - return "workerPool: string expected"; - } - if (message.errorCode != null && message.hasOwnProperty("errorCode")) - switch (message.errorCode) { - default: - return "errorCode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) { - var error = $root.google.rpc.Status.verify(message.errorStatus); - if (error) - return "errorStatus." + error; - } - if (message.build != null && message.hasOwnProperty("build")) - if (!$util.isString(message.build)) - return "build: string expected"; - if (message.tfErrors != null && message.hasOwnProperty("tfErrors")) { - if (!Array.isArray(message.tfErrors)) - return "tfErrors: array expected"; - for (var i = 0; i < message.tfErrors.length; ++i) { - var error = $root.google.cloud.config.v1.TerraformError.verify(message.tfErrors[i]); - if (error) - return "tfErrors." + error; - } - } - if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) - if (!$util.isString(message.errorLogs)) - return "errorLogs: string expected"; - if (message.previewArtifacts != null && message.hasOwnProperty("previewArtifacts")) { - var error = $root.google.cloud.config.v1.PreviewArtifacts.verify(message.previewArtifacts); - if (error) - return "previewArtifacts." + error; - } - if (message.logs != null && message.hasOwnProperty("logs")) - if (!$util.isString(message.logs)) - return "logs: string expected"; - if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) - if (!$util.isString(message.tfVersion)) - return "tfVersion: string expected"; - if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) { - properties._tfVersionConstraint = 1; - if (!$util.isString(message.tfVersionConstraint)) - return "tfVersionConstraint: string expected"; - } - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) { - var error = $root.google.cloud.config.v1.ProviderConfig.verify(message.providerConfig); - if (error) - return "providerConfig." + error; - } - return null; - }; - - /** - * Creates a Preview message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.Preview - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.Preview} Preview - */ - Preview.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.Preview) - return object; - var message = new $root.google.cloud.config.v1.Preview(); - if (object.terraformBlueprint != null) { - if (typeof object.terraformBlueprint !== "object") - throw TypeError(".google.cloud.config.v1.Preview.terraformBlueprint: object expected"); - message.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.fromObject(object.terraformBlueprint); - } - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.config.v1.Preview.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.config.v1.Preview.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "APPLYING": - case 3: - message.state = 3; - break; - case "STALE": - case 4: - message.state = 4; - break; - case "DELETING": - case 5: - message.state = 5; - break; - case "FAILED": - case 6: - message.state = 6; - break; - case "DELETED": - case 7: - message.state = 7; - break; - } - if (object.deployment != null) - message.deployment = String(object.deployment); - switch (object.previewMode) { - default: - if (typeof object.previewMode === "number") { - message.previewMode = object.previewMode; - break; - } - break; - case "PREVIEW_MODE_UNSPECIFIED": - case 0: - message.previewMode = 0; - break; - case "DEFAULT": - case 1: - message.previewMode = 1; - break; - case "DELETE": - case 2: - message.previewMode = 2; - break; - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.artifactsGcsBucket != null) - message.artifactsGcsBucket = String(object.artifactsGcsBucket); - if (object.workerPool != null) - message.workerPool = String(object.workerPool); - switch (object.errorCode) { - default: - if (typeof object.errorCode === "number") { - message.errorCode = object.errorCode; - break; - } - break; - case "ERROR_CODE_UNSPECIFIED": - case 0: - message.errorCode = 0; - break; - case "CLOUD_BUILD_PERMISSION_DENIED": - case 1: - message.errorCode = 1; - break; - case "BUCKET_CREATION_PERMISSION_DENIED": - case 2: - message.errorCode = 2; - break; - case "BUCKET_CREATION_FAILED": - case 3: - message.errorCode = 3; - break; - case "DEPLOYMENT_LOCK_ACQUIRE_FAILED": - case 4: - message.errorCode = 4; - break; - case "PREVIEW_BUILD_API_FAILED": - case 5: - message.errorCode = 5; - break; - case "PREVIEW_BUILD_RUN_FAILED": - case 6: - message.errorCode = 6; - break; - case "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": - case 7: - message.errorCode = 7; - break; - } - if (object.errorStatus != null) { - if (typeof object.errorStatus !== "object") - throw TypeError(".google.cloud.config.v1.Preview.errorStatus: object expected"); - message.errorStatus = $root.google.rpc.Status.fromObject(object.errorStatus); - } - if (object.build != null) - message.build = String(object.build); - if (object.tfErrors) { - if (!Array.isArray(object.tfErrors)) - throw TypeError(".google.cloud.config.v1.Preview.tfErrors: array expected"); - message.tfErrors = []; - for (var i = 0; i < object.tfErrors.length; ++i) { - if (typeof object.tfErrors[i] !== "object") - throw TypeError(".google.cloud.config.v1.Preview.tfErrors: object expected"); - message.tfErrors[i] = $root.google.cloud.config.v1.TerraformError.fromObject(object.tfErrors[i]); - } - } - if (object.errorLogs != null) - message.errorLogs = String(object.errorLogs); - if (object.previewArtifacts != null) { - if (typeof object.previewArtifacts !== "object") - throw TypeError(".google.cloud.config.v1.Preview.previewArtifacts: object expected"); - message.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.fromObject(object.previewArtifacts); - } - if (object.logs != null) - message.logs = String(object.logs); - if (object.tfVersion != null) - message.tfVersion = String(object.tfVersion); - if (object.tfVersionConstraint != null) - message.tfVersionConstraint = String(object.tfVersionConstraint); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.config.v1.Preview.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - if (object.providerConfig != null) { - if (typeof object.providerConfig !== "object") - throw TypeError(".google.cloud.config.v1.Preview.providerConfig: object expected"); - message.providerConfig = $root.google.cloud.config.v1.ProviderConfig.fromObject(object.providerConfig); - } - return message; - }; - - /** - * Creates a plain object from a Preview message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.Preview - * @static - * @param {google.cloud.config.v1.Preview} message Preview - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Preview.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tfErrors = []; - if (options.objects || options.defaults) { - object.labels = {}; - object.annotations = {}; - } - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.deployment = ""; - object.serviceAccount = ""; - object.errorCode = options.enums === String ? "ERROR_CODE_UNSPECIFIED" : 0; - object.errorStatus = null; - object.build = ""; - object.errorLogs = ""; - object.previewMode = options.enums === String ? "PREVIEW_MODE_UNSPECIFIED" : 0; - object.previewArtifacts = null; - object.logs = ""; - object.tfVersion = ""; - object.providerConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.config.v1.Preview.State[message.state] === undefined ? message.state : $root.google.cloud.config.v1.Preview.State[message.state] : message.state; - if (message.deployment != null && message.hasOwnProperty("deployment")) - object.deployment = message.deployment; - if (message.terraformBlueprint != null && message.hasOwnProperty("terraformBlueprint")) { - object.terraformBlueprint = $root.google.cloud.config.v1.TerraformBlueprint.toObject(message.terraformBlueprint, options); - if (options.oneofs) - object.blueprint = "terraformBlueprint"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.artifactsGcsBucket != null && message.hasOwnProperty("artifactsGcsBucket")) { - object.artifactsGcsBucket = message.artifactsGcsBucket; - if (options.oneofs) - object._artifactsGcsBucket = "artifactsGcsBucket"; - } - if (message.workerPool != null && message.hasOwnProperty("workerPool")) { - object.workerPool = message.workerPool; - if (options.oneofs) - object._workerPool = "workerPool"; - } - if (message.errorCode != null && message.hasOwnProperty("errorCode")) - object.errorCode = options.enums === String ? $root.google.cloud.config.v1.Preview.ErrorCode[message.errorCode] === undefined ? message.errorCode : $root.google.cloud.config.v1.Preview.ErrorCode[message.errorCode] : message.errorCode; - if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) - object.errorStatus = $root.google.rpc.Status.toObject(message.errorStatus, options); - if (message.build != null && message.hasOwnProperty("build")) - object.build = message.build; - if (message.tfErrors && message.tfErrors.length) { - object.tfErrors = []; - for (var j = 0; j < message.tfErrors.length; ++j) - object.tfErrors[j] = $root.google.cloud.config.v1.TerraformError.toObject(message.tfErrors[j], options); - } - if (message.errorLogs != null && message.hasOwnProperty("errorLogs")) - object.errorLogs = message.errorLogs; - if (message.previewMode != null && message.hasOwnProperty("previewMode")) - object.previewMode = options.enums === String ? $root.google.cloud.config.v1.Preview.PreviewMode[message.previewMode] === undefined ? message.previewMode : $root.google.cloud.config.v1.Preview.PreviewMode[message.previewMode] : message.previewMode; - if (message.previewArtifacts != null && message.hasOwnProperty("previewArtifacts")) - object.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.toObject(message.previewArtifacts, options); - if (message.logs != null && message.hasOwnProperty("logs")) - object.logs = message.logs; - if (message.tfVersion != null && message.hasOwnProperty("tfVersion")) - object.tfVersion = message.tfVersion; - if (message.tfVersionConstraint != null && message.hasOwnProperty("tfVersionConstraint")) { - object.tfVersionConstraint = message.tfVersionConstraint; - if (options.oneofs) - object._tfVersionConstraint = "tfVersionConstraint"; - } - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; - } - if (message.providerConfig != null && message.hasOwnProperty("providerConfig")) - object.providerConfig = $root.google.cloud.config.v1.ProviderConfig.toObject(message.providerConfig, options); - return object; - }; - - /** - * Converts this Preview to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.Preview - * @instance - * @returns {Object.} JSON object - */ - Preview.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Preview - * @function getTypeUrl - * @memberof google.cloud.config.v1.Preview - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Preview.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.Preview"; - }; - - /** - * State enum. - * @name google.cloud.config.v1.Preview.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} APPLYING=3 APPLYING value - * @property {number} STALE=4 STALE value - * @property {number} DELETING=5 DELETING value - * @property {number} FAILED=6 FAILED value - * @property {number} DELETED=7 DELETED value - */ - Preview.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "APPLYING"] = 3; - values[valuesById[4] = "STALE"] = 4; - values[valuesById[5] = "DELETING"] = 5; - values[valuesById[6] = "FAILED"] = 6; - values[valuesById[7] = "DELETED"] = 7; - return values; - })(); - - /** - * PreviewMode enum. - * @name google.cloud.config.v1.Preview.PreviewMode - * @enum {number} - * @property {number} PREVIEW_MODE_UNSPECIFIED=0 PREVIEW_MODE_UNSPECIFIED value - * @property {number} DEFAULT=1 DEFAULT value - * @property {number} DELETE=2 DELETE value - */ - Preview.PreviewMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PREVIEW_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEFAULT"] = 1; - values[valuesById[2] = "DELETE"] = 2; - return values; - })(); - - /** - * ErrorCode enum. - * @name google.cloud.config.v1.Preview.ErrorCode - * @enum {number} - * @property {number} ERROR_CODE_UNSPECIFIED=0 ERROR_CODE_UNSPECIFIED value - * @property {number} CLOUD_BUILD_PERMISSION_DENIED=1 CLOUD_BUILD_PERMISSION_DENIED value - * @property {number} BUCKET_CREATION_PERMISSION_DENIED=2 BUCKET_CREATION_PERMISSION_DENIED value - * @property {number} BUCKET_CREATION_FAILED=3 BUCKET_CREATION_FAILED value - * @property {number} DEPLOYMENT_LOCK_ACQUIRE_FAILED=4 DEPLOYMENT_LOCK_ACQUIRE_FAILED value - * @property {number} PREVIEW_BUILD_API_FAILED=5 PREVIEW_BUILD_API_FAILED value - * @property {number} PREVIEW_BUILD_RUN_FAILED=6 PREVIEW_BUILD_RUN_FAILED value - * @property {number} EXTERNAL_VALUE_SOURCE_IMPORT_FAILED=7 EXTERNAL_VALUE_SOURCE_IMPORT_FAILED value - */ - Preview.ErrorCode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ERROR_CODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_BUILD_PERMISSION_DENIED"] = 1; - values[valuesById[2] = "BUCKET_CREATION_PERMISSION_DENIED"] = 2; - values[valuesById[3] = "BUCKET_CREATION_FAILED"] = 3; - values[valuesById[4] = "DEPLOYMENT_LOCK_ACQUIRE_FAILED"] = 4; - values[valuesById[5] = "PREVIEW_BUILD_API_FAILED"] = 5; - values[valuesById[6] = "PREVIEW_BUILD_RUN_FAILED"] = 6; - values[valuesById[7] = "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED"] = 7; - return values; - })(); - - return Preview; - })(); - - v1.PreviewOperationMetadata = (function() { - - /** - * Properties of a PreviewOperationMetadata. - * @memberof google.cloud.config.v1 - * @interface IPreviewOperationMetadata - * @property {google.cloud.config.v1.PreviewOperationMetadata.PreviewStep|null} [step] PreviewOperationMetadata step - * @property {google.cloud.config.v1.IPreviewArtifacts|null} [previewArtifacts] PreviewOperationMetadata previewArtifacts - * @property {string|null} [logs] PreviewOperationMetadata logs - * @property {string|null} [build] PreviewOperationMetadata build - */ - - /** - * Constructs a new PreviewOperationMetadata. - * @memberof google.cloud.config.v1 - * @classdesc Represents a PreviewOperationMetadata. - * @implements IPreviewOperationMetadata - * @constructor - * @param {google.cloud.config.v1.IPreviewOperationMetadata=} [properties] Properties to set - */ - function PreviewOperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PreviewOperationMetadata step. - * @member {google.cloud.config.v1.PreviewOperationMetadata.PreviewStep} step - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @instance - */ - PreviewOperationMetadata.prototype.step = 0; - - /** - * PreviewOperationMetadata previewArtifacts. - * @member {google.cloud.config.v1.IPreviewArtifacts|null|undefined} previewArtifacts - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @instance - */ - PreviewOperationMetadata.prototype.previewArtifacts = null; - - /** - * PreviewOperationMetadata logs. - * @member {string} logs - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @instance - */ - PreviewOperationMetadata.prototype.logs = ""; - - /** - * PreviewOperationMetadata build. - * @member {string} build - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @instance - */ - PreviewOperationMetadata.prototype.build = ""; - - /** - * Creates a new PreviewOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @static - * @param {google.cloud.config.v1.IPreviewOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.config.v1.PreviewOperationMetadata} PreviewOperationMetadata instance - */ - PreviewOperationMetadata.create = function create(properties) { - return new PreviewOperationMetadata(properties); - }; - - /** - * Encodes the specified PreviewOperationMetadata message. Does not implicitly {@link google.cloud.config.v1.PreviewOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @static - * @param {google.cloud.config.v1.IPreviewOperationMetadata} message PreviewOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreviewOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.step != null && Object.hasOwnProperty.call(message, "step")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.step); - if (message.previewArtifacts != null && Object.hasOwnProperty.call(message, "previewArtifacts")) - $root.google.cloud.config.v1.PreviewArtifacts.encode(message.previewArtifacts, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.logs != null && Object.hasOwnProperty.call(message, "logs")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.logs); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.build); - return writer; - }; - - /** - * Encodes the specified PreviewOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @static - * @param {google.cloud.config.v1.IPreviewOperationMetadata} message PreviewOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreviewOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PreviewOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.PreviewOperationMetadata} PreviewOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreviewOperationMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PreviewOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.step = reader.int32(); - break; - } - case 2: { - message.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.decode(reader, reader.uint32()); - break; - } - case 3: { - message.logs = reader.string(); - break; - } - case 4: { - message.build = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PreviewOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.PreviewOperationMetadata} PreviewOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreviewOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PreviewOperationMetadata message. - * @function verify - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PreviewOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.step != null && message.hasOwnProperty("step")) - switch (message.step) { - default: - return "step: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - break; - } - if (message.previewArtifacts != null && message.hasOwnProperty("previewArtifacts")) { - var error = $root.google.cloud.config.v1.PreviewArtifacts.verify(message.previewArtifacts); - if (error) - return "previewArtifacts." + error; - } - if (message.logs != null && message.hasOwnProperty("logs")) - if (!$util.isString(message.logs)) - return "logs: string expected"; - if (message.build != null && message.hasOwnProperty("build")) - if (!$util.isString(message.build)) - return "build: string expected"; - return null; - }; - - /** - * Creates a PreviewOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.PreviewOperationMetadata} PreviewOperationMetadata - */ - PreviewOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.PreviewOperationMetadata) - return object; - var message = new $root.google.cloud.config.v1.PreviewOperationMetadata(); - switch (object.step) { - default: - if (typeof object.step === "number") { - message.step = object.step; - break; - } - break; - case "PREVIEW_STEP_UNSPECIFIED": - case 0: - message.step = 0; - break; - case "PREPARING_STORAGE_BUCKET": - case 1: - message.step = 1; - break; - case "DOWNLOADING_BLUEPRINT": - case 2: - message.step = 2; - break; - case "RUNNING_TF_INIT": - case 3: - message.step = 3; - break; - case "RUNNING_TF_PLAN": - case 4: - message.step = 4; - break; - case "FETCHING_DEPLOYMENT": - case 5: - message.step = 5; - break; - case "LOCKING_DEPLOYMENT": - case 6: - message.step = 6; - break; - case "UNLOCKING_DEPLOYMENT": - case 7: - message.step = 7; - break; - case "SUCCEEDED": - case 8: - message.step = 8; - break; - case "FAILED": - case 9: - message.step = 9; - break; - case "VALIDATING_REPOSITORY": - case 10: - message.step = 10; - break; - } - if (object.previewArtifacts != null) { - if (typeof object.previewArtifacts !== "object") - throw TypeError(".google.cloud.config.v1.PreviewOperationMetadata.previewArtifacts: object expected"); - message.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.fromObject(object.previewArtifacts); - } - if (object.logs != null) - message.logs = String(object.logs); - if (object.build != null) - message.build = String(object.build); - return message; - }; - - /** - * Creates a plain object from a PreviewOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @static - * @param {google.cloud.config.v1.PreviewOperationMetadata} message PreviewOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PreviewOperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.step = options.enums === String ? "PREVIEW_STEP_UNSPECIFIED" : 0; - object.previewArtifacts = null; - object.logs = ""; - object.build = ""; - } - if (message.step != null && message.hasOwnProperty("step")) - object.step = options.enums === String ? $root.google.cloud.config.v1.PreviewOperationMetadata.PreviewStep[message.step] === undefined ? message.step : $root.google.cloud.config.v1.PreviewOperationMetadata.PreviewStep[message.step] : message.step; - if (message.previewArtifacts != null && message.hasOwnProperty("previewArtifacts")) - object.previewArtifacts = $root.google.cloud.config.v1.PreviewArtifacts.toObject(message.previewArtifacts, options); - if (message.logs != null && message.hasOwnProperty("logs")) - object.logs = message.logs; - if (message.build != null && message.hasOwnProperty("build")) - object.build = message.build; - return object; - }; - - /** - * Converts this PreviewOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - PreviewOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PreviewOperationMetadata - * @function getTypeUrl - * @memberof google.cloud.config.v1.PreviewOperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PreviewOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.PreviewOperationMetadata"; - }; - - /** - * PreviewStep enum. - * @name google.cloud.config.v1.PreviewOperationMetadata.PreviewStep - * @enum {number} - * @property {number} PREVIEW_STEP_UNSPECIFIED=0 PREVIEW_STEP_UNSPECIFIED value - * @property {number} PREPARING_STORAGE_BUCKET=1 PREPARING_STORAGE_BUCKET value - * @property {number} DOWNLOADING_BLUEPRINT=2 DOWNLOADING_BLUEPRINT value - * @property {number} RUNNING_TF_INIT=3 RUNNING_TF_INIT value - * @property {number} RUNNING_TF_PLAN=4 RUNNING_TF_PLAN value - * @property {number} FETCHING_DEPLOYMENT=5 FETCHING_DEPLOYMENT value - * @property {number} LOCKING_DEPLOYMENT=6 LOCKING_DEPLOYMENT value - * @property {number} UNLOCKING_DEPLOYMENT=7 UNLOCKING_DEPLOYMENT value - * @property {number} SUCCEEDED=8 SUCCEEDED value - * @property {number} FAILED=9 FAILED value - * @property {number} VALIDATING_REPOSITORY=10 VALIDATING_REPOSITORY value - */ - PreviewOperationMetadata.PreviewStep = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PREVIEW_STEP_UNSPECIFIED"] = 0; - values[valuesById[1] = "PREPARING_STORAGE_BUCKET"] = 1; - values[valuesById[2] = "DOWNLOADING_BLUEPRINT"] = 2; - values[valuesById[3] = "RUNNING_TF_INIT"] = 3; - values[valuesById[4] = "RUNNING_TF_PLAN"] = 4; - values[valuesById[5] = "FETCHING_DEPLOYMENT"] = 5; - values[valuesById[6] = "LOCKING_DEPLOYMENT"] = 6; - values[valuesById[7] = "UNLOCKING_DEPLOYMENT"] = 7; - values[valuesById[8] = "SUCCEEDED"] = 8; - values[valuesById[9] = "FAILED"] = 9; - values[valuesById[10] = "VALIDATING_REPOSITORY"] = 10; - return values; - })(); - - return PreviewOperationMetadata; - })(); - - v1.PreviewArtifacts = (function() { - - /** - * Properties of a PreviewArtifacts. - * @memberof google.cloud.config.v1 - * @interface IPreviewArtifacts - * @property {string|null} [content] PreviewArtifacts content - * @property {string|null} [artifacts] PreviewArtifacts artifacts - */ - - /** - * Constructs a new PreviewArtifacts. - * @memberof google.cloud.config.v1 - * @classdesc Represents a PreviewArtifacts. - * @implements IPreviewArtifacts - * @constructor - * @param {google.cloud.config.v1.IPreviewArtifacts=} [properties] Properties to set - */ - function PreviewArtifacts(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PreviewArtifacts content. - * @member {string} content - * @memberof google.cloud.config.v1.PreviewArtifacts - * @instance - */ - PreviewArtifacts.prototype.content = ""; - - /** - * PreviewArtifacts artifacts. - * @member {string} artifacts - * @memberof google.cloud.config.v1.PreviewArtifacts - * @instance - */ - PreviewArtifacts.prototype.artifacts = ""; - - /** - * Creates a new PreviewArtifacts instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.PreviewArtifacts - * @static - * @param {google.cloud.config.v1.IPreviewArtifacts=} [properties] Properties to set - * @returns {google.cloud.config.v1.PreviewArtifacts} PreviewArtifacts instance - */ - PreviewArtifacts.create = function create(properties) { - return new PreviewArtifacts(properties); - }; - - /** - * Encodes the specified PreviewArtifacts message. Does not implicitly {@link google.cloud.config.v1.PreviewArtifacts.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.PreviewArtifacts - * @static - * @param {google.cloud.config.v1.IPreviewArtifacts} message PreviewArtifacts message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreviewArtifacts.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.artifacts != null && Object.hasOwnProperty.call(message, "artifacts")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifacts); - return writer; - }; - - /** - * Encodes the specified PreviewArtifacts message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewArtifacts.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.PreviewArtifacts - * @static - * @param {google.cloud.config.v1.IPreviewArtifacts} message PreviewArtifacts message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreviewArtifacts.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PreviewArtifacts message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.PreviewArtifacts - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.PreviewArtifacts} PreviewArtifacts - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreviewArtifacts.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PreviewArtifacts(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.content = reader.string(); - break; - } - case 2: { - message.artifacts = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PreviewArtifacts message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.PreviewArtifacts - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.PreviewArtifacts} PreviewArtifacts - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreviewArtifacts.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PreviewArtifacts message. - * @function verify - * @memberof google.cloud.config.v1.PreviewArtifacts - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PreviewArtifacts.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.artifacts != null && message.hasOwnProperty("artifacts")) - if (!$util.isString(message.artifacts)) - return "artifacts: string expected"; - return null; - }; - - /** - * Creates a PreviewArtifacts message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.PreviewArtifacts - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.PreviewArtifacts} PreviewArtifacts - */ - PreviewArtifacts.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.PreviewArtifacts) - return object; - var message = new $root.google.cloud.config.v1.PreviewArtifacts(); - if (object.content != null) - message.content = String(object.content); - if (object.artifacts != null) - message.artifacts = String(object.artifacts); - return message; - }; - - /** - * Creates a plain object from a PreviewArtifacts message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.PreviewArtifacts - * @static - * @param {google.cloud.config.v1.PreviewArtifacts} message PreviewArtifacts - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PreviewArtifacts.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.content = ""; - object.artifacts = ""; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.artifacts != null && message.hasOwnProperty("artifacts")) - object.artifacts = message.artifacts; - return object; - }; - - /** - * Converts this PreviewArtifacts to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.PreviewArtifacts - * @instance - * @returns {Object.} JSON object - */ - PreviewArtifacts.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PreviewArtifacts - * @function getTypeUrl - * @memberof google.cloud.config.v1.PreviewArtifacts - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PreviewArtifacts.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.PreviewArtifacts"; - }; - - return PreviewArtifacts; - })(); - - v1.CreatePreviewRequest = (function() { - - /** - * Properties of a CreatePreviewRequest. - * @memberof google.cloud.config.v1 - * @interface ICreatePreviewRequest - * @property {string|null} [parent] CreatePreviewRequest parent - * @property {string|null} [previewId] CreatePreviewRequest previewId - * @property {google.cloud.config.v1.IPreview|null} [preview] CreatePreviewRequest preview - * @property {string|null} [requestId] CreatePreviewRequest requestId - */ - - /** - * Constructs a new CreatePreviewRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a CreatePreviewRequest. - * @implements ICreatePreviewRequest - * @constructor - * @param {google.cloud.config.v1.ICreatePreviewRequest=} [properties] Properties to set - */ - function CreatePreviewRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreatePreviewRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @instance - */ - CreatePreviewRequest.prototype.parent = ""; - - /** - * CreatePreviewRequest previewId. - * @member {string} previewId - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @instance - */ - CreatePreviewRequest.prototype.previewId = ""; - - /** - * CreatePreviewRequest preview. - * @member {google.cloud.config.v1.IPreview|null|undefined} preview - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @instance - */ - CreatePreviewRequest.prototype.preview = null; - - /** - * CreatePreviewRequest requestId. - * @member {string} requestId - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @instance - */ - CreatePreviewRequest.prototype.requestId = ""; - - /** - * Creates a new CreatePreviewRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @static - * @param {google.cloud.config.v1.ICreatePreviewRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.CreatePreviewRequest} CreatePreviewRequest instance - */ - CreatePreviewRequest.create = function create(properties) { - return new CreatePreviewRequest(properties); - }; - - /** - * Encodes the specified CreatePreviewRequest message. Does not implicitly {@link google.cloud.config.v1.CreatePreviewRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @static - * @param {google.cloud.config.v1.ICreatePreviewRequest} message CreatePreviewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePreviewRequest.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.previewId != null && Object.hasOwnProperty.call(message, "previewId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.previewId); - if (message.preview != null && Object.hasOwnProperty.call(message, "preview")) - $root.google.cloud.config.v1.Preview.encode(message.preview, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified CreatePreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.CreatePreviewRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @static - * @param {google.cloud.config.v1.ICreatePreviewRequest} message CreatePreviewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePreviewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreatePreviewRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.CreatePreviewRequest} CreatePreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePreviewRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.CreatePreviewRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.previewId = reader.string(); - break; - } - case 3: { - message.preview = $root.google.cloud.config.v1.Preview.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreatePreviewRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.CreatePreviewRequest} CreatePreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePreviewRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreatePreviewRequest message. - * @function verify - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreatePreviewRequest.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.previewId != null && message.hasOwnProperty("previewId")) - if (!$util.isString(message.previewId)) - return "previewId: string expected"; - if (message.preview != null && message.hasOwnProperty("preview")) { - var error = $root.google.cloud.config.v1.Preview.verify(message.preview); - if (error) - return "preview." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreatePreviewRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.CreatePreviewRequest} CreatePreviewRequest - */ - CreatePreviewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.CreatePreviewRequest) - return object; - var message = new $root.google.cloud.config.v1.CreatePreviewRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.previewId != null) - message.previewId = String(object.previewId); - if (object.preview != null) { - if (typeof object.preview !== "object") - throw TypeError(".google.cloud.config.v1.CreatePreviewRequest.preview: object expected"); - message.preview = $root.google.cloud.config.v1.Preview.fromObject(object.preview); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreatePreviewRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @static - * @param {google.cloud.config.v1.CreatePreviewRequest} message CreatePreviewRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreatePreviewRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.previewId = ""; - object.preview = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.previewId != null && message.hasOwnProperty("previewId")) - object.previewId = message.previewId; - if (message.preview != null && message.hasOwnProperty("preview")) - object.preview = $root.google.cloud.config.v1.Preview.toObject(message.preview, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreatePreviewRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @instance - * @returns {Object.} JSON object - */ - CreatePreviewRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreatePreviewRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.CreatePreviewRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreatePreviewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.CreatePreviewRequest"; - }; - - return CreatePreviewRequest; - })(); - - v1.GetPreviewRequest = (function() { - - /** - * Properties of a GetPreviewRequest. - * @memberof google.cloud.config.v1 - * @interface IGetPreviewRequest - * @property {string|null} [name] GetPreviewRequest name - */ - - /** - * Constructs a new GetPreviewRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a GetPreviewRequest. - * @implements IGetPreviewRequest - * @constructor - * @param {google.cloud.config.v1.IGetPreviewRequest=} [properties] Properties to set - */ - function GetPreviewRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPreviewRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.GetPreviewRequest - * @instance - */ - GetPreviewRequest.prototype.name = ""; - - /** - * Creates a new GetPreviewRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.GetPreviewRequest - * @static - * @param {google.cloud.config.v1.IGetPreviewRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.GetPreviewRequest} GetPreviewRequest instance - */ - GetPreviewRequest.create = function create(properties) { - return new GetPreviewRequest(properties); - }; - - /** - * Encodes the specified GetPreviewRequest message. Does not implicitly {@link google.cloud.config.v1.GetPreviewRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.GetPreviewRequest - * @static - * @param {google.cloud.config.v1.IGetPreviewRequest} message GetPreviewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPreviewRequest.encode = function encode(message, writer) { - 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 GetPreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetPreviewRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.GetPreviewRequest - * @static - * @param {google.cloud.config.v1.IGetPreviewRequest} message GetPreviewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPreviewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPreviewRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.GetPreviewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.GetPreviewRequest} GetPreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPreviewRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetPreviewRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPreviewRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.GetPreviewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.GetPreviewRequest} GetPreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPreviewRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPreviewRequest message. - * @function verify - * @memberof google.cloud.config.v1.GetPreviewRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPreviewRequest.verify = function verify(message) { - if (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 GetPreviewRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.GetPreviewRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.GetPreviewRequest} GetPreviewRequest - */ - GetPreviewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.GetPreviewRequest) - return object; - var message = new $root.google.cloud.config.v1.GetPreviewRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetPreviewRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.GetPreviewRequest - * @static - * @param {google.cloud.config.v1.GetPreviewRequest} message GetPreviewRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPreviewRequest.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 GetPreviewRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.GetPreviewRequest - * @instance - * @returns {Object.} JSON object - */ - GetPreviewRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPreviewRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.GetPreviewRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPreviewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.GetPreviewRequest"; - }; - - return GetPreviewRequest; - })(); - - v1.ListPreviewsRequest = (function() { - - /** - * Properties of a ListPreviewsRequest. - * @memberof google.cloud.config.v1 - * @interface IListPreviewsRequest - * @property {string|null} [parent] ListPreviewsRequest parent - * @property {number|null} [pageSize] ListPreviewsRequest pageSize - * @property {string|null} [pageToken] ListPreviewsRequest pageToken - * @property {string|null} [filter] ListPreviewsRequest filter - * @property {string|null} [orderBy] ListPreviewsRequest orderBy - */ - - /** - * Constructs a new ListPreviewsRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListPreviewsRequest. - * @implements IListPreviewsRequest - * @constructor - * @param {google.cloud.config.v1.IListPreviewsRequest=} [properties] Properties to set - */ - function ListPreviewsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPreviewsRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @instance - */ - ListPreviewsRequest.prototype.parent = ""; - - /** - * ListPreviewsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @instance - */ - ListPreviewsRequest.prototype.pageSize = 0; - - /** - * ListPreviewsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @instance - */ - ListPreviewsRequest.prototype.pageToken = ""; - - /** - * ListPreviewsRequest filter. - * @member {string} filter - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @instance - */ - ListPreviewsRequest.prototype.filter = ""; - - /** - * ListPreviewsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @instance - */ - ListPreviewsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListPreviewsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @static - * @param {google.cloud.config.v1.IListPreviewsRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListPreviewsRequest} ListPreviewsRequest instance - */ - ListPreviewsRequest.create = function create(properties) { - return new ListPreviewsRequest(properties); - }; - - /** - * Encodes the specified ListPreviewsRequest message. Does not implicitly {@link google.cloud.config.v1.ListPreviewsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @static - * @param {google.cloud.config.v1.IListPreviewsRequest} message ListPreviewsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPreviewsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListPreviewsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListPreviewsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @static - * @param {google.cloud.config.v1.IListPreviewsRequest} message ListPreviewsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPreviewsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPreviewsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListPreviewsRequest} ListPreviewsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPreviewsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListPreviewsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPreviewsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListPreviewsRequest} ListPreviewsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPreviewsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPreviewsRequest message. - * @function verify - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPreviewsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListPreviewsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListPreviewsRequest} ListPreviewsRequest - */ - ListPreviewsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListPreviewsRequest) - return object; - var message = new $root.google.cloud.config.v1.ListPreviewsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListPreviewsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @static - * @param {google.cloud.config.v1.ListPreviewsRequest} message ListPreviewsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPreviewsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListPreviewsRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPreviewsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPreviewsRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListPreviewsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPreviewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListPreviewsRequest"; - }; - - return ListPreviewsRequest; - })(); - - v1.ListPreviewsResponse = (function() { - - /** - * Properties of a ListPreviewsResponse. - * @memberof google.cloud.config.v1 - * @interface IListPreviewsResponse - * @property {Array.|null} [previews] ListPreviewsResponse previews - * @property {string|null} [nextPageToken] ListPreviewsResponse nextPageToken - * @property {Array.|null} [unreachable] ListPreviewsResponse unreachable - */ - - /** - * Constructs a new ListPreviewsResponse. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListPreviewsResponse. - * @implements IListPreviewsResponse - * @constructor - * @param {google.cloud.config.v1.IListPreviewsResponse=} [properties] Properties to set - */ - function ListPreviewsResponse(properties) { - this.previews = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPreviewsResponse previews. - * @member {Array.} previews - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @instance - */ - ListPreviewsResponse.prototype.previews = $util.emptyArray; - - /** - * ListPreviewsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @instance - */ - ListPreviewsResponse.prototype.nextPageToken = ""; - - /** - * ListPreviewsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @instance - */ - ListPreviewsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListPreviewsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @static - * @param {google.cloud.config.v1.IListPreviewsResponse=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListPreviewsResponse} ListPreviewsResponse instance - */ - ListPreviewsResponse.create = function create(properties) { - return new ListPreviewsResponse(properties); - }; - - /** - * Encodes the specified ListPreviewsResponse message. Does not implicitly {@link google.cloud.config.v1.ListPreviewsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @static - * @param {google.cloud.config.v1.IListPreviewsResponse} message ListPreviewsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPreviewsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.previews != null && message.previews.length) - for (var i = 0; i < message.previews.length; ++i) - $root.google.cloud.config.v1.Preview.encode(message.previews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListPreviewsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListPreviewsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @static - * @param {google.cloud.config.v1.IListPreviewsResponse} message ListPreviewsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPreviewsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPreviewsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListPreviewsResponse} ListPreviewsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPreviewsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListPreviewsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.previews && message.previews.length)) - message.previews = []; - message.previews.push($root.google.cloud.config.v1.Preview.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPreviewsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListPreviewsResponse} ListPreviewsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPreviewsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPreviewsResponse message. - * @function verify - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPreviewsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.previews != null && message.hasOwnProperty("previews")) { - if (!Array.isArray(message.previews)) - return "previews: array expected"; - for (var i = 0; i < message.previews.length; ++i) { - var error = $root.google.cloud.config.v1.Preview.verify(message.previews[i]); - if (error) - return "previews." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListPreviewsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListPreviewsResponse} ListPreviewsResponse - */ - ListPreviewsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListPreviewsResponse) - return object; - var message = new $root.google.cloud.config.v1.ListPreviewsResponse(); - if (object.previews) { - if (!Array.isArray(object.previews)) - throw TypeError(".google.cloud.config.v1.ListPreviewsResponse.previews: array expected"); - message.previews = []; - for (var i = 0; i < object.previews.length; ++i) { - if (typeof object.previews[i] !== "object") - throw TypeError(".google.cloud.config.v1.ListPreviewsResponse.previews: object expected"); - message.previews[i] = $root.google.cloud.config.v1.Preview.fromObject(object.previews[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.config.v1.ListPreviewsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListPreviewsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @static - * @param {google.cloud.config.v1.ListPreviewsResponse} message ListPreviewsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPreviewsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.previews = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.previews && message.previews.length) { - object.previews = []; - for (var j = 0; j < message.previews.length; ++j) - object.previews[j] = $root.google.cloud.config.v1.Preview.toObject(message.previews[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListPreviewsResponse to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @instance - * @returns {Object.} JSON object - */ - ListPreviewsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPreviewsResponse - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListPreviewsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPreviewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListPreviewsResponse"; - }; - - return ListPreviewsResponse; - })(); - - v1.DeletePreviewRequest = (function() { - - /** - * Properties of a DeletePreviewRequest. - * @memberof google.cloud.config.v1 - * @interface IDeletePreviewRequest - * @property {string|null} [name] DeletePreviewRequest name - * @property {string|null} [requestId] DeletePreviewRequest requestId - */ - - /** - * Constructs a new DeletePreviewRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a DeletePreviewRequest. - * @implements IDeletePreviewRequest - * @constructor - * @param {google.cloud.config.v1.IDeletePreviewRequest=} [properties] Properties to set - */ - function DeletePreviewRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeletePreviewRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @instance - */ - DeletePreviewRequest.prototype.name = ""; - - /** - * DeletePreviewRequest requestId. - * @member {string} requestId - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @instance - */ - DeletePreviewRequest.prototype.requestId = ""; - - /** - * Creates a new DeletePreviewRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @static - * @param {google.cloud.config.v1.IDeletePreviewRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.DeletePreviewRequest} DeletePreviewRequest instance - */ - DeletePreviewRequest.create = function create(properties) { - return new DeletePreviewRequest(properties); - }; - - /** - * Encodes the specified DeletePreviewRequest message. Does not implicitly {@link google.cloud.config.v1.DeletePreviewRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @static - * @param {google.cloud.config.v1.IDeletePreviewRequest} message DeletePreviewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePreviewRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified DeletePreviewRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.DeletePreviewRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @static - * @param {google.cloud.config.v1.IDeletePreviewRequest} message DeletePreviewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePreviewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeletePreviewRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.DeletePreviewRequest} DeletePreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePreviewRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.DeletePreviewRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeletePreviewRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.DeletePreviewRequest} DeletePreviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePreviewRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeletePreviewRequest message. - * @function verify - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeletePreviewRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a DeletePreviewRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.DeletePreviewRequest} DeletePreviewRequest - */ - DeletePreviewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.DeletePreviewRequest) - return object; - var message = new $root.google.cloud.config.v1.DeletePreviewRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a DeletePreviewRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @static - * @param {google.cloud.config.v1.DeletePreviewRequest} message DeletePreviewRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeletePreviewRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this DeletePreviewRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @instance - * @returns {Object.} JSON object - */ - DeletePreviewRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeletePreviewRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.DeletePreviewRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeletePreviewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.DeletePreviewRequest"; - }; - - return DeletePreviewRequest; - })(); - - v1.ExportPreviewResultRequest = (function() { - - /** - * Properties of an ExportPreviewResultRequest. - * @memberof google.cloud.config.v1 - * @interface IExportPreviewResultRequest - * @property {string|null} [parent] ExportPreviewResultRequest parent - */ - - /** - * Constructs a new ExportPreviewResultRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents an ExportPreviewResultRequest. - * @implements IExportPreviewResultRequest - * @constructor - * @param {google.cloud.config.v1.IExportPreviewResultRequest=} [properties] Properties to set - */ - function ExportPreviewResultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExportPreviewResultRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.ExportPreviewResultRequest - * @instance - */ - ExportPreviewResultRequest.prototype.parent = ""; - - /** - * Creates a new ExportPreviewResultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ExportPreviewResultRequest - * @static - * @param {google.cloud.config.v1.IExportPreviewResultRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ExportPreviewResultRequest} ExportPreviewResultRequest instance - */ - ExportPreviewResultRequest.create = function create(properties) { - return new ExportPreviewResultRequest(properties); - }; - - /** - * Encodes the specified ExportPreviewResultRequest message. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ExportPreviewResultRequest - * @static - * @param {google.cloud.config.v1.IExportPreviewResultRequest} message ExportPreviewResultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportPreviewResultRequest.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); - return writer; - }; - - /** - * Encodes the specified ExportPreviewResultRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ExportPreviewResultRequest - * @static - * @param {google.cloud.config.v1.IExportPreviewResultRequest} message ExportPreviewResultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportPreviewResultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportPreviewResultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ExportPreviewResultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ExportPreviewResultRequest} ExportPreviewResultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportPreviewResultRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ExportPreviewResultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportPreviewResultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ExportPreviewResultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ExportPreviewResultRequest} ExportPreviewResultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportPreviewResultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportPreviewResultRequest message. - * @function verify - * @memberof google.cloud.config.v1.ExportPreviewResultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportPreviewResultRequest.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"; - return null; - }; - - /** - * Creates an ExportPreviewResultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ExportPreviewResultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ExportPreviewResultRequest} ExportPreviewResultRequest - */ - ExportPreviewResultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ExportPreviewResultRequest) - return object; - var message = new $root.google.cloud.config.v1.ExportPreviewResultRequest(); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; - - /** - * Creates a plain object from an ExportPreviewResultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ExportPreviewResultRequest - * @static - * @param {google.cloud.config.v1.ExportPreviewResultRequest} message ExportPreviewResultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportPreviewResultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; - - /** - * Converts this ExportPreviewResultRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ExportPreviewResultRequest - * @instance - * @returns {Object.} JSON object - */ - ExportPreviewResultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportPreviewResultRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ExportPreviewResultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportPreviewResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ExportPreviewResultRequest"; - }; - - return ExportPreviewResultRequest; - })(); - - v1.ExportPreviewResultResponse = (function() { - - /** - * Properties of an ExportPreviewResultResponse. - * @memberof google.cloud.config.v1 - * @interface IExportPreviewResultResponse - * @property {google.cloud.config.v1.IPreviewResult|null} [result] ExportPreviewResultResponse result - */ - - /** - * Constructs a new ExportPreviewResultResponse. - * @memberof google.cloud.config.v1 - * @classdesc Represents an ExportPreviewResultResponse. - * @implements IExportPreviewResultResponse - * @constructor - * @param {google.cloud.config.v1.IExportPreviewResultResponse=} [properties] Properties to set - */ - function ExportPreviewResultResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExportPreviewResultResponse result. - * @member {google.cloud.config.v1.IPreviewResult|null|undefined} result - * @memberof google.cloud.config.v1.ExportPreviewResultResponse - * @instance - */ - ExportPreviewResultResponse.prototype.result = null; - - /** - * Creates a new ExportPreviewResultResponse instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ExportPreviewResultResponse - * @static - * @param {google.cloud.config.v1.IExportPreviewResultResponse=} [properties] Properties to set - * @returns {google.cloud.config.v1.ExportPreviewResultResponse} ExportPreviewResultResponse instance - */ - ExportPreviewResultResponse.create = function create(properties) { - return new ExportPreviewResultResponse(properties); - }; - - /** - * Encodes the specified ExportPreviewResultResponse message. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ExportPreviewResultResponse - * @static - * @param {google.cloud.config.v1.IExportPreviewResultResponse} message ExportPreviewResultResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportPreviewResultResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.google.cloud.config.v1.PreviewResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExportPreviewResultResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ExportPreviewResultResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ExportPreviewResultResponse - * @static - * @param {google.cloud.config.v1.IExportPreviewResultResponse} message ExportPreviewResultResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportPreviewResultResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportPreviewResultResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ExportPreviewResultResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ExportPreviewResultResponse} ExportPreviewResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportPreviewResultResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ExportPreviewResultResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.result = $root.google.cloud.config.v1.PreviewResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportPreviewResultResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ExportPreviewResultResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ExportPreviewResultResponse} ExportPreviewResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportPreviewResultResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportPreviewResultResponse message. - * @function verify - * @memberof google.cloud.config.v1.ExportPreviewResultResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportPreviewResultResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.google.cloud.config.v1.PreviewResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates an ExportPreviewResultResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ExportPreviewResultResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ExportPreviewResultResponse} ExportPreviewResultResponse - */ - ExportPreviewResultResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ExportPreviewResultResponse) - return object; - var message = new $root.google.cloud.config.v1.ExportPreviewResultResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".google.cloud.config.v1.ExportPreviewResultResponse.result: object expected"); - message.result = $root.google.cloud.config.v1.PreviewResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from an ExportPreviewResultResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ExportPreviewResultResponse - * @static - * @param {google.cloud.config.v1.ExportPreviewResultResponse} message ExportPreviewResultResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportPreviewResultResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.google.cloud.config.v1.PreviewResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this ExportPreviewResultResponse to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ExportPreviewResultResponse - * @instance - * @returns {Object.} JSON object - */ - ExportPreviewResultResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportPreviewResultResponse - * @function getTypeUrl - * @memberof google.cloud.config.v1.ExportPreviewResultResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportPreviewResultResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ExportPreviewResultResponse"; - }; - - return ExportPreviewResultResponse; - })(); - - v1.PreviewResult = (function() { - - /** - * Properties of a PreviewResult. - * @memberof google.cloud.config.v1 - * @interface IPreviewResult - * @property {string|null} [binarySignedUri] PreviewResult binarySignedUri - * @property {string|null} [jsonSignedUri] PreviewResult jsonSignedUri - */ - - /** - * Constructs a new PreviewResult. - * @memberof google.cloud.config.v1 - * @classdesc Represents a PreviewResult. - * @implements IPreviewResult - * @constructor - * @param {google.cloud.config.v1.IPreviewResult=} [properties] Properties to set - */ - function PreviewResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PreviewResult binarySignedUri. - * @member {string} binarySignedUri - * @memberof google.cloud.config.v1.PreviewResult - * @instance - */ - PreviewResult.prototype.binarySignedUri = ""; - - /** - * PreviewResult jsonSignedUri. - * @member {string} jsonSignedUri - * @memberof google.cloud.config.v1.PreviewResult - * @instance - */ - PreviewResult.prototype.jsonSignedUri = ""; - - /** - * Creates a new PreviewResult instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.PreviewResult - * @static - * @param {google.cloud.config.v1.IPreviewResult=} [properties] Properties to set - * @returns {google.cloud.config.v1.PreviewResult} PreviewResult instance - */ - PreviewResult.create = function create(properties) { - return new PreviewResult(properties); - }; - - /** - * Encodes the specified PreviewResult message. Does not implicitly {@link google.cloud.config.v1.PreviewResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.PreviewResult - * @static - * @param {google.cloud.config.v1.IPreviewResult} message PreviewResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreviewResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.binarySignedUri != null && Object.hasOwnProperty.call(message, "binarySignedUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.binarySignedUri); - if (message.jsonSignedUri != null && Object.hasOwnProperty.call(message, "jsonSignedUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.jsonSignedUri); - return writer; - }; - - /** - * Encodes the specified PreviewResult message, length delimited. Does not implicitly {@link google.cloud.config.v1.PreviewResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.PreviewResult - * @static - * @param {google.cloud.config.v1.IPreviewResult} message PreviewResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreviewResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PreviewResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.PreviewResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.PreviewResult} PreviewResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreviewResult.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PreviewResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.binarySignedUri = reader.string(); - break; - } - case 2: { - message.jsonSignedUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PreviewResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.PreviewResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.PreviewResult} PreviewResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreviewResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PreviewResult message. - * @function verify - * @memberof google.cloud.config.v1.PreviewResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PreviewResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.binarySignedUri != null && message.hasOwnProperty("binarySignedUri")) - if (!$util.isString(message.binarySignedUri)) - return "binarySignedUri: string expected"; - if (message.jsonSignedUri != null && message.hasOwnProperty("jsonSignedUri")) - if (!$util.isString(message.jsonSignedUri)) - return "jsonSignedUri: string expected"; - return null; - }; - - /** - * Creates a PreviewResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.PreviewResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.PreviewResult} PreviewResult - */ - PreviewResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.PreviewResult) - return object; - var message = new $root.google.cloud.config.v1.PreviewResult(); - if (object.binarySignedUri != null) - message.binarySignedUri = String(object.binarySignedUri); - if (object.jsonSignedUri != null) - message.jsonSignedUri = String(object.jsonSignedUri); - return message; - }; - - /** - * Creates a plain object from a PreviewResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.PreviewResult - * @static - * @param {google.cloud.config.v1.PreviewResult} message PreviewResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PreviewResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.binarySignedUri = ""; - object.jsonSignedUri = ""; - } - if (message.binarySignedUri != null && message.hasOwnProperty("binarySignedUri")) - object.binarySignedUri = message.binarySignedUri; - if (message.jsonSignedUri != null && message.hasOwnProperty("jsonSignedUri")) - object.jsonSignedUri = message.jsonSignedUri; - return object; - }; - - /** - * Converts this PreviewResult to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.PreviewResult - * @instance - * @returns {Object.} JSON object - */ - PreviewResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PreviewResult - * @function getTypeUrl - * @memberof google.cloud.config.v1.PreviewResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PreviewResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.PreviewResult"; - }; - - return PreviewResult; - })(); - - v1.GetTerraformVersionRequest = (function() { - - /** - * Properties of a GetTerraformVersionRequest. - * @memberof google.cloud.config.v1 - * @interface IGetTerraformVersionRequest - * @property {string|null} [name] GetTerraformVersionRequest name - */ - - /** - * Constructs a new GetTerraformVersionRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a GetTerraformVersionRequest. - * @implements IGetTerraformVersionRequest - * @constructor - * @param {google.cloud.config.v1.IGetTerraformVersionRequest=} [properties] Properties to set - */ - function GetTerraformVersionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTerraformVersionRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.GetTerraformVersionRequest - * @instance - */ - GetTerraformVersionRequest.prototype.name = ""; - - /** - * Creates a new GetTerraformVersionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.GetTerraformVersionRequest - * @static - * @param {google.cloud.config.v1.IGetTerraformVersionRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.GetTerraformVersionRequest} GetTerraformVersionRequest instance - */ - GetTerraformVersionRequest.create = function create(properties) { - return new GetTerraformVersionRequest(properties); - }; - - /** - * Encodes the specified GetTerraformVersionRequest message. Does not implicitly {@link google.cloud.config.v1.GetTerraformVersionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.GetTerraformVersionRequest - * @static - * @param {google.cloud.config.v1.IGetTerraformVersionRequest} message GetTerraformVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTerraformVersionRequest.encode = function encode(message, writer) { - 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 GetTerraformVersionRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetTerraformVersionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.GetTerraformVersionRequest - * @static - * @param {google.cloud.config.v1.IGetTerraformVersionRequest} message GetTerraformVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTerraformVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTerraformVersionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.GetTerraformVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.GetTerraformVersionRequest} GetTerraformVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTerraformVersionRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetTerraformVersionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetTerraformVersionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.GetTerraformVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.GetTerraformVersionRequest} GetTerraformVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTerraformVersionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTerraformVersionRequest message. - * @function verify - * @memberof google.cloud.config.v1.GetTerraformVersionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTerraformVersionRequest.verify = function verify(message) { - if (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 GetTerraformVersionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.GetTerraformVersionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.GetTerraformVersionRequest} GetTerraformVersionRequest - */ - GetTerraformVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.GetTerraformVersionRequest) - return object; - var message = new $root.google.cloud.config.v1.GetTerraformVersionRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetTerraformVersionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.GetTerraformVersionRequest - * @static - * @param {google.cloud.config.v1.GetTerraformVersionRequest} message GetTerraformVersionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTerraformVersionRequest.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 GetTerraformVersionRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.GetTerraformVersionRequest - * @instance - * @returns {Object.} JSON object - */ - GetTerraformVersionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetTerraformVersionRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.GetTerraformVersionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetTerraformVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.GetTerraformVersionRequest"; - }; - - return GetTerraformVersionRequest; - })(); - - v1.ListTerraformVersionsRequest = (function() { - - /** - * Properties of a ListTerraformVersionsRequest. - * @memberof google.cloud.config.v1 - * @interface IListTerraformVersionsRequest - * @property {string|null} [parent] ListTerraformVersionsRequest parent - * @property {number|null} [pageSize] ListTerraformVersionsRequest pageSize - * @property {string|null} [pageToken] ListTerraformVersionsRequest pageToken - * @property {string|null} [filter] ListTerraformVersionsRequest filter - * @property {string|null} [orderBy] ListTerraformVersionsRequest orderBy - */ - - /** - * Constructs a new ListTerraformVersionsRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListTerraformVersionsRequest. - * @implements IListTerraformVersionsRequest - * @constructor - * @param {google.cloud.config.v1.IListTerraformVersionsRequest=} [properties] Properties to set - */ - function ListTerraformVersionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTerraformVersionsRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @instance - */ - ListTerraformVersionsRequest.prototype.parent = ""; - - /** - * ListTerraformVersionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @instance - */ - ListTerraformVersionsRequest.prototype.pageSize = 0; - - /** - * ListTerraformVersionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @instance - */ - ListTerraformVersionsRequest.prototype.pageToken = ""; - - /** - * ListTerraformVersionsRequest filter. - * @member {string} filter - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @instance - */ - ListTerraformVersionsRequest.prototype.filter = ""; - - /** - * ListTerraformVersionsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @instance - */ - ListTerraformVersionsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListTerraformVersionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @static - * @param {google.cloud.config.v1.IListTerraformVersionsRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListTerraformVersionsRequest} ListTerraformVersionsRequest instance - */ - ListTerraformVersionsRequest.create = function create(properties) { - return new ListTerraformVersionsRequest(properties); - }; - - /** - * Encodes the specified ListTerraformVersionsRequest message. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @static - * @param {google.cloud.config.v1.IListTerraformVersionsRequest} message ListTerraformVersionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTerraformVersionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListTerraformVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @static - * @param {google.cloud.config.v1.IListTerraformVersionsRequest} message ListTerraformVersionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTerraformVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTerraformVersionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListTerraformVersionsRequest} ListTerraformVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTerraformVersionsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListTerraformVersionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTerraformVersionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListTerraformVersionsRequest} ListTerraformVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTerraformVersionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTerraformVersionsRequest message. - * @function verify - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTerraformVersionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListTerraformVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListTerraformVersionsRequest} ListTerraformVersionsRequest - */ - ListTerraformVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListTerraformVersionsRequest) - return object; - var message = new $root.google.cloud.config.v1.ListTerraformVersionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListTerraformVersionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @static - * @param {google.cloud.config.v1.ListTerraformVersionsRequest} message ListTerraformVersionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTerraformVersionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListTerraformVersionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListTerraformVersionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTerraformVersionsRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListTerraformVersionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTerraformVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListTerraformVersionsRequest"; - }; - - return ListTerraformVersionsRequest; - })(); - - v1.ListTerraformVersionsResponse = (function() { - - /** - * Properties of a ListTerraformVersionsResponse. - * @memberof google.cloud.config.v1 - * @interface IListTerraformVersionsResponse - * @property {Array.|null} [terraformVersions] ListTerraformVersionsResponse terraformVersions - * @property {string|null} [nextPageToken] ListTerraformVersionsResponse nextPageToken - * @property {Array.|null} [unreachable] ListTerraformVersionsResponse unreachable - */ - - /** - * Constructs a new ListTerraformVersionsResponse. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListTerraformVersionsResponse. - * @implements IListTerraformVersionsResponse - * @constructor - * @param {google.cloud.config.v1.IListTerraformVersionsResponse=} [properties] Properties to set - */ - function ListTerraformVersionsResponse(properties) { - this.terraformVersions = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTerraformVersionsResponse terraformVersions. - * @member {Array.} terraformVersions - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @instance - */ - ListTerraformVersionsResponse.prototype.terraformVersions = $util.emptyArray; - - /** - * ListTerraformVersionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @instance - */ - ListTerraformVersionsResponse.prototype.nextPageToken = ""; - - /** - * ListTerraformVersionsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @instance - */ - ListTerraformVersionsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListTerraformVersionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @static - * @param {google.cloud.config.v1.IListTerraformVersionsResponse=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListTerraformVersionsResponse} ListTerraformVersionsResponse instance - */ - ListTerraformVersionsResponse.create = function create(properties) { - return new ListTerraformVersionsResponse(properties); - }; - - /** - * Encodes the specified ListTerraformVersionsResponse message. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @static - * @param {google.cloud.config.v1.IListTerraformVersionsResponse} message ListTerraformVersionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTerraformVersionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.terraformVersions != null && message.terraformVersions.length) - for (var i = 0; i < message.terraformVersions.length; ++i) - $root.google.cloud.config.v1.TerraformVersion.encode(message.terraformVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListTerraformVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListTerraformVersionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @static - * @param {google.cloud.config.v1.IListTerraformVersionsResponse} message ListTerraformVersionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTerraformVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTerraformVersionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListTerraformVersionsResponse} ListTerraformVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTerraformVersionsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListTerraformVersionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.terraformVersions && message.terraformVersions.length)) - message.terraformVersions = []; - message.terraformVersions.push($root.google.cloud.config.v1.TerraformVersion.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTerraformVersionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListTerraformVersionsResponse} ListTerraformVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTerraformVersionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTerraformVersionsResponse message. - * @function verify - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTerraformVersionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.terraformVersions != null && message.hasOwnProperty("terraformVersions")) { - if (!Array.isArray(message.terraformVersions)) - return "terraformVersions: array expected"; - for (var i = 0; i < message.terraformVersions.length; ++i) { - var error = $root.google.cloud.config.v1.TerraformVersion.verify(message.terraformVersions[i]); - if (error) - return "terraformVersions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListTerraformVersionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListTerraformVersionsResponse} ListTerraformVersionsResponse - */ - ListTerraformVersionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListTerraformVersionsResponse) - return object; - var message = new $root.google.cloud.config.v1.ListTerraformVersionsResponse(); - if (object.terraformVersions) { - if (!Array.isArray(object.terraformVersions)) - throw TypeError(".google.cloud.config.v1.ListTerraformVersionsResponse.terraformVersions: array expected"); - message.terraformVersions = []; - for (var i = 0; i < object.terraformVersions.length; ++i) { - if (typeof object.terraformVersions[i] !== "object") - throw TypeError(".google.cloud.config.v1.ListTerraformVersionsResponse.terraformVersions: object expected"); - message.terraformVersions[i] = $root.google.cloud.config.v1.TerraformVersion.fromObject(object.terraformVersions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.config.v1.ListTerraformVersionsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListTerraformVersionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @static - * @param {google.cloud.config.v1.ListTerraformVersionsResponse} message ListTerraformVersionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTerraformVersionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.terraformVersions = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.terraformVersions && message.terraformVersions.length) { - object.terraformVersions = []; - for (var j = 0; j < message.terraformVersions.length; ++j) - object.terraformVersions[j] = $root.google.cloud.config.v1.TerraformVersion.toObject(message.terraformVersions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListTerraformVersionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListTerraformVersionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTerraformVersionsResponse - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListTerraformVersionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTerraformVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListTerraformVersionsResponse"; - }; - - return ListTerraformVersionsResponse; - })(); - - v1.TerraformVersion = (function() { - - /** - * Properties of a TerraformVersion. - * @memberof google.cloud.config.v1 - * @interface ITerraformVersion - * @property {string|null} [name] TerraformVersion name - * @property {google.cloud.config.v1.TerraformVersion.State|null} [state] TerraformVersion state - * @property {google.protobuf.ITimestamp|null} [supportTime] TerraformVersion supportTime - * @property {google.protobuf.ITimestamp|null} [deprecateTime] TerraformVersion deprecateTime - * @property {google.protobuf.ITimestamp|null} [obsoleteTime] TerraformVersion obsoleteTime - */ - - /** - * Constructs a new TerraformVersion. - * @memberof google.cloud.config.v1 - * @classdesc Represents a TerraformVersion. - * @implements ITerraformVersion - * @constructor - * @param {google.cloud.config.v1.ITerraformVersion=} [properties] Properties to set - */ - function TerraformVersion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TerraformVersion name. - * @member {string} name - * @memberof google.cloud.config.v1.TerraformVersion - * @instance - */ - TerraformVersion.prototype.name = ""; - - /** - * TerraformVersion state. - * @member {google.cloud.config.v1.TerraformVersion.State} state - * @memberof google.cloud.config.v1.TerraformVersion - * @instance - */ - TerraformVersion.prototype.state = 0; - - /** - * TerraformVersion supportTime. - * @member {google.protobuf.ITimestamp|null|undefined} supportTime - * @memberof google.cloud.config.v1.TerraformVersion - * @instance - */ - TerraformVersion.prototype.supportTime = null; - - /** - * TerraformVersion deprecateTime. - * @member {google.protobuf.ITimestamp|null|undefined} deprecateTime - * @memberof google.cloud.config.v1.TerraformVersion - * @instance - */ - TerraformVersion.prototype.deprecateTime = null; - - /** - * TerraformVersion obsoleteTime. - * @member {google.protobuf.ITimestamp|null|undefined} obsoleteTime - * @memberof google.cloud.config.v1.TerraformVersion - * @instance - */ - TerraformVersion.prototype.obsoleteTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TerraformVersion.prototype, "_deprecateTime", { - get: $util.oneOfGetter($oneOfFields = ["deprecateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TerraformVersion.prototype, "_obsoleteTime", { - get: $util.oneOfGetter($oneOfFields = ["obsoleteTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TerraformVersion instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.TerraformVersion - * @static - * @param {google.cloud.config.v1.ITerraformVersion=} [properties] Properties to set - * @returns {google.cloud.config.v1.TerraformVersion} TerraformVersion instance - */ - TerraformVersion.create = function create(properties) { - return new TerraformVersion(properties); - }; - - /** - * Encodes the specified TerraformVersion message. Does not implicitly {@link google.cloud.config.v1.TerraformVersion.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.TerraformVersion - * @static - * @param {google.cloud.config.v1.ITerraformVersion} message TerraformVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TerraformVersion.encode = function encode(message, writer) { - 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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.supportTime != null && Object.hasOwnProperty.call(message, "supportTime")) - $root.google.protobuf.Timestamp.encode(message.supportTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.deprecateTime != null && Object.hasOwnProperty.call(message, "deprecateTime")) - $root.google.protobuf.Timestamp.encode(message.deprecateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.obsoleteTime != null && Object.hasOwnProperty.call(message, "obsoleteTime")) - $root.google.protobuf.Timestamp.encode(message.obsoleteTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TerraformVersion message, length delimited. Does not implicitly {@link google.cloud.config.v1.TerraformVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.TerraformVersion - * @static - * @param {google.cloud.config.v1.ITerraformVersion} message TerraformVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TerraformVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TerraformVersion message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.TerraformVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.TerraformVersion} TerraformVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TerraformVersion.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.TerraformVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.supportTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.deprecateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.obsoleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TerraformVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.TerraformVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.TerraformVersion} TerraformVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TerraformVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TerraformVersion message. - * @function verify - * @memberof google.cloud.config.v1.TerraformVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TerraformVersion.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.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.supportTime != null && message.hasOwnProperty("supportTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.supportTime); - if (error) - return "supportTime." + error; - } - if (message.deprecateTime != null && message.hasOwnProperty("deprecateTime")) { - properties._deprecateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.deprecateTime); - if (error) - return "deprecateTime." + error; - } - } - if (message.obsoleteTime != null && message.hasOwnProperty("obsoleteTime")) { - properties._obsoleteTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.obsoleteTime); - if (error) - return "obsoleteTime." + error; - } - } - return null; - }; - - /** - * Creates a TerraformVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.TerraformVersion - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.TerraformVersion} TerraformVersion - */ - TerraformVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.TerraformVersion) - return object; - var message = new $root.google.cloud.config.v1.TerraformVersion(); - if (object.name != null) - message.name = String(object.name); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "DEPRECATED": - case 2: - message.state = 2; - break; - case "OBSOLETE": - case 3: - message.state = 3; - break; - } - if (object.supportTime != null) { - if (typeof object.supportTime !== "object") - throw TypeError(".google.cloud.config.v1.TerraformVersion.supportTime: object expected"); - message.supportTime = $root.google.protobuf.Timestamp.fromObject(object.supportTime); - } - if (object.deprecateTime != null) { - if (typeof object.deprecateTime !== "object") - throw TypeError(".google.cloud.config.v1.TerraformVersion.deprecateTime: object expected"); - message.deprecateTime = $root.google.protobuf.Timestamp.fromObject(object.deprecateTime); - } - if (object.obsoleteTime != null) { - if (typeof object.obsoleteTime !== "object") - throw TypeError(".google.cloud.config.v1.TerraformVersion.obsoleteTime: object expected"); - message.obsoleteTime = $root.google.protobuf.Timestamp.fromObject(object.obsoleteTime); - } - return message; - }; - - /** - * Creates a plain object from a TerraformVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.TerraformVersion - * @static - * @param {google.cloud.config.v1.TerraformVersion} message TerraformVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TerraformVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.supportTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.config.v1.TerraformVersion.State[message.state] === undefined ? message.state : $root.google.cloud.config.v1.TerraformVersion.State[message.state] : message.state; - if (message.supportTime != null && message.hasOwnProperty("supportTime")) - object.supportTime = $root.google.protobuf.Timestamp.toObject(message.supportTime, options); - if (message.deprecateTime != null && message.hasOwnProperty("deprecateTime")) { - object.deprecateTime = $root.google.protobuf.Timestamp.toObject(message.deprecateTime, options); - if (options.oneofs) - object._deprecateTime = "deprecateTime"; - } - if (message.obsoleteTime != null && message.hasOwnProperty("obsoleteTime")) { - object.obsoleteTime = $root.google.protobuf.Timestamp.toObject(message.obsoleteTime, options); - if (options.oneofs) - object._obsoleteTime = "obsoleteTime"; - } - return object; - }; - - /** - * Converts this TerraformVersion to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.TerraformVersion - * @instance - * @returns {Object.} JSON object - */ - TerraformVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TerraformVersion - * @function getTypeUrl - * @memberof google.cloud.config.v1.TerraformVersion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TerraformVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.TerraformVersion"; - }; - - /** - * State enum. - * @name google.cloud.config.v1.TerraformVersion.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} DEPRECATED=2 DEPRECATED value - * @property {number} OBSOLETE=3 OBSOLETE value - */ - TerraformVersion.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "DEPRECATED"] = 2; - values[valuesById[3] = "OBSOLETE"] = 3; - return values; - })(); - - return TerraformVersion; - })(); - - v1.ResourceChangeTerraformInfo = (function() { - - /** - * Properties of a ResourceChangeTerraformInfo. - * @memberof google.cloud.config.v1 - * @interface IResourceChangeTerraformInfo - * @property {string|null} [address] ResourceChangeTerraformInfo address - * @property {string|null} [type] ResourceChangeTerraformInfo type - * @property {string|null} [resourceName] ResourceChangeTerraformInfo resourceName - * @property {string|null} [provider] ResourceChangeTerraformInfo provider - * @property {Array.|null} [actions] ResourceChangeTerraformInfo actions - */ - - /** - * Constructs a new ResourceChangeTerraformInfo. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ResourceChangeTerraformInfo. - * @implements IResourceChangeTerraformInfo - * @constructor - * @param {google.cloud.config.v1.IResourceChangeTerraformInfo=} [properties] Properties to set - */ - function ResourceChangeTerraformInfo(properties) { - this.actions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceChangeTerraformInfo address. - * @member {string} address - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @instance - */ - ResourceChangeTerraformInfo.prototype.address = ""; - - /** - * ResourceChangeTerraformInfo type. - * @member {string} type - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @instance - */ - ResourceChangeTerraformInfo.prototype.type = ""; - - /** - * ResourceChangeTerraformInfo resourceName. - * @member {string} resourceName - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @instance - */ - ResourceChangeTerraformInfo.prototype.resourceName = ""; - - /** - * ResourceChangeTerraformInfo provider. - * @member {string} provider - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @instance - */ - ResourceChangeTerraformInfo.prototype.provider = ""; - - /** - * ResourceChangeTerraformInfo actions. - * @member {Array.} actions - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @instance - */ - ResourceChangeTerraformInfo.prototype.actions = $util.emptyArray; - - /** - * Creates a new ResourceChangeTerraformInfo instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @static - * @param {google.cloud.config.v1.IResourceChangeTerraformInfo=} [properties] Properties to set - * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo instance - */ - ResourceChangeTerraformInfo.create = function create(properties) { - return new ResourceChangeTerraformInfo(properties); - }; - - /** - * Encodes the specified ResourceChangeTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @static - * @param {google.cloud.config.v1.IResourceChangeTerraformInfo} message ResourceChangeTerraformInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceChangeTerraformInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); - if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); - if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.provider); - if (message.actions != null && message.actions.length) - for (var i = 0; i < message.actions.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.actions[i]); - return writer; - }; - - /** - * Encodes the specified ResourceChangeTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @static - * @param {google.cloud.config.v1.IResourceChangeTerraformInfo} message ResourceChangeTerraformInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceChangeTerraformInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceChangeTerraformInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceChangeTerraformInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceChangeTerraformInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.address = reader.string(); - break; - } - case 2: { - message.type = reader.string(); - break; - } - case 3: { - message.resourceName = reader.string(); - break; - } - case 4: { - message.provider = reader.string(); - break; - } - case 5: { - if (!(message.actions && message.actions.length)) - message.actions = []; - message.actions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceChangeTerraformInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceChangeTerraformInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceChangeTerraformInfo message. - * @function verify - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceChangeTerraformInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - if (!$util.isString(message.resourceName)) - return "resourceName: string expected"; - if (message.provider != null && message.hasOwnProperty("provider")) - if (!$util.isString(message.provider)) - return "provider: string expected"; - if (message.actions != null && message.hasOwnProperty("actions")) { - if (!Array.isArray(message.actions)) - return "actions: array expected"; - for (var i = 0; i < message.actions.length; ++i) - if (!$util.isString(message.actions[i])) - return "actions: string[] expected"; - } - return null; - }; - - /** - * Creates a ResourceChangeTerraformInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo - */ - ResourceChangeTerraformInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ResourceChangeTerraformInfo) - return object; - var message = new $root.google.cloud.config.v1.ResourceChangeTerraformInfo(); - if (object.address != null) - message.address = String(object.address); - if (object.type != null) - message.type = String(object.type); - if (object.resourceName != null) - message.resourceName = String(object.resourceName); - if (object.provider != null) - message.provider = String(object.provider); - if (object.actions) { - if (!Array.isArray(object.actions)) - throw TypeError(".google.cloud.config.v1.ResourceChangeTerraformInfo.actions: array expected"); - message.actions = []; - for (var i = 0; i < object.actions.length; ++i) - message.actions[i] = String(object.actions[i]); - } - return message; - }; - - /** - * Creates a plain object from a ResourceChangeTerraformInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @static - * @param {google.cloud.config.v1.ResourceChangeTerraformInfo} message ResourceChangeTerraformInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceChangeTerraformInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.actions = []; - if (options.defaults) { - object.address = ""; - object.type = ""; - object.resourceName = ""; - object.provider = ""; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - object.resourceName = message.resourceName; - if (message.provider != null && message.hasOwnProperty("provider")) - object.provider = message.provider; - if (message.actions && message.actions.length) { - object.actions = []; - for (var j = 0; j < message.actions.length; ++j) - object.actions[j] = message.actions[j]; - } - return object; - }; - - /** - * Converts this ResourceChangeTerraformInfo to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @instance - * @returns {Object.} JSON object - */ - ResourceChangeTerraformInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceChangeTerraformInfo - * @function getTypeUrl - * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceChangeTerraformInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ResourceChangeTerraformInfo"; - }; - - return ResourceChangeTerraformInfo; - })(); - - v1.ResourceChange = (function() { - - /** - * Properties of a ResourceChange. - * @memberof google.cloud.config.v1 - * @interface IResourceChange - * @property {string|null} [name] ResourceChange name - * @property {google.cloud.config.v1.IResourceChangeTerraformInfo|null} [terraformInfo] ResourceChange terraformInfo - * @property {google.cloud.config.v1.ResourceChange.Intent|null} [intent] ResourceChange intent - * @property {Array.|null} [propertyChanges] ResourceChange propertyChanges - */ - - /** - * Constructs a new ResourceChange. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ResourceChange. - * @implements IResourceChange - * @constructor - * @param {google.cloud.config.v1.IResourceChange=} [properties] Properties to set - */ - function ResourceChange(properties) { - this.propertyChanges = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceChange name. - * @member {string} name - * @memberof google.cloud.config.v1.ResourceChange - * @instance - */ - ResourceChange.prototype.name = ""; - - /** - * ResourceChange terraformInfo. - * @member {google.cloud.config.v1.IResourceChangeTerraformInfo|null|undefined} terraformInfo - * @memberof google.cloud.config.v1.ResourceChange - * @instance - */ - ResourceChange.prototype.terraformInfo = null; - - /** - * ResourceChange intent. - * @member {google.cloud.config.v1.ResourceChange.Intent} intent - * @memberof google.cloud.config.v1.ResourceChange - * @instance - */ - ResourceChange.prototype.intent = 0; - - /** - * ResourceChange propertyChanges. - * @member {Array.} propertyChanges - * @memberof google.cloud.config.v1.ResourceChange - * @instance - */ - ResourceChange.prototype.propertyChanges = $util.emptyArray; - - /** - * Creates a new ResourceChange instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ResourceChange - * @static - * @param {google.cloud.config.v1.IResourceChange=} [properties] Properties to set - * @returns {google.cloud.config.v1.ResourceChange} ResourceChange instance - */ - ResourceChange.create = function create(properties) { - return new ResourceChange(properties); - }; - - /** - * Encodes the specified ResourceChange message. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ResourceChange - * @static - * @param {google.cloud.config.v1.IResourceChange} message ResourceChange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceChange.encode = function encode(message, writer) { - 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.terraformInfo != null && Object.hasOwnProperty.call(message, "terraformInfo")) - $root.google.cloud.config.v1.ResourceChangeTerraformInfo.encode(message.terraformInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.intent); - if (message.propertyChanges != null && message.propertyChanges.length) - for (var i = 0; i < message.propertyChanges.length; ++i) - $root.google.cloud.config.v1.PropertyChange.encode(message.propertyChanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResourceChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ResourceChange - * @static - * @param {google.cloud.config.v1.IResourceChange} message ResourceChange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceChange message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ResourceChange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ResourceChange} ResourceChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceChange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceChange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.terraformInfo = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.decode(reader, reader.uint32()); - break; - } - case 3: { - message.intent = reader.int32(); - break; - } - case 4: { - if (!(message.propertyChanges && message.propertyChanges.length)) - message.propertyChanges = []; - message.propertyChanges.push($root.google.cloud.config.v1.PropertyChange.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceChange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ResourceChange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ResourceChange} ResourceChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceChange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceChange message. - * @function verify - * @memberof google.cloud.config.v1.ResourceChange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceChange.verify = function verify(message) { - if (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.terraformInfo != null && message.hasOwnProperty("terraformInfo")) { - var error = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.verify(message.terraformInfo); - if (error) - return "terraformInfo." + error; - } - if (message.intent != null && message.hasOwnProperty("intent")) - switch (message.intent) { - default: - return "intent: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.propertyChanges != null && message.hasOwnProperty("propertyChanges")) { - if (!Array.isArray(message.propertyChanges)) - return "propertyChanges: array expected"; - for (var i = 0; i < message.propertyChanges.length; ++i) { - var error = $root.google.cloud.config.v1.PropertyChange.verify(message.propertyChanges[i]); - if (error) - return "propertyChanges." + error; - } - } - return null; - }; - - /** - * Creates a ResourceChange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ResourceChange - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ResourceChange} ResourceChange - */ - ResourceChange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ResourceChange) - return object; - var message = new $root.google.cloud.config.v1.ResourceChange(); - if (object.name != null) - message.name = String(object.name); - if (object.terraformInfo != null) { - if (typeof object.terraformInfo !== "object") - throw TypeError(".google.cloud.config.v1.ResourceChange.terraformInfo: object expected"); - message.terraformInfo = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.fromObject(object.terraformInfo); - } - switch (object.intent) { - default: - if (typeof object.intent === "number") { - message.intent = object.intent; - break; - } - break; - case "INTENT_UNSPECIFIED": - case 0: - message.intent = 0; - break; - case "CREATE": - case 1: - message.intent = 1; - break; - case "UPDATE": - case 2: - message.intent = 2; - break; - case "DELETE": - case 3: - message.intent = 3; - break; - case "RECREATE": - case 4: - message.intent = 4; - break; - case "UNCHANGED": - case 5: - message.intent = 5; - break; - } - if (object.propertyChanges) { - if (!Array.isArray(object.propertyChanges)) - throw TypeError(".google.cloud.config.v1.ResourceChange.propertyChanges: array expected"); - message.propertyChanges = []; - for (var i = 0; i < object.propertyChanges.length; ++i) { - if (typeof object.propertyChanges[i] !== "object") - throw TypeError(".google.cloud.config.v1.ResourceChange.propertyChanges: object expected"); - message.propertyChanges[i] = $root.google.cloud.config.v1.PropertyChange.fromObject(object.propertyChanges[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceChange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ResourceChange - * @static - * @param {google.cloud.config.v1.ResourceChange} message ResourceChange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceChange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.propertyChanges = []; - if (options.defaults) { - object.name = ""; - object.terraformInfo = null; - object.intent = options.enums === String ? "INTENT_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.terraformInfo != null && message.hasOwnProperty("terraformInfo")) - object.terraformInfo = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.toObject(message.terraformInfo, options); - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = options.enums === String ? $root.google.cloud.config.v1.ResourceChange.Intent[message.intent] === undefined ? message.intent : $root.google.cloud.config.v1.ResourceChange.Intent[message.intent] : message.intent; - if (message.propertyChanges && message.propertyChanges.length) { - object.propertyChanges = []; - for (var j = 0; j < message.propertyChanges.length; ++j) - object.propertyChanges[j] = $root.google.cloud.config.v1.PropertyChange.toObject(message.propertyChanges[j], options); - } - return object; - }; - - /** - * Converts this ResourceChange to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ResourceChange - * @instance - * @returns {Object.} JSON object - */ - ResourceChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceChange - * @function getTypeUrl - * @memberof google.cloud.config.v1.ResourceChange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ResourceChange"; - }; - - /** - * Intent enum. - * @name google.cloud.config.v1.ResourceChange.Intent - * @enum {number} - * @property {number} INTENT_UNSPECIFIED=0 INTENT_UNSPECIFIED value - * @property {number} CREATE=1 CREATE value - * @property {number} UPDATE=2 UPDATE value - * @property {number} DELETE=3 DELETE value - * @property {number} RECREATE=4 RECREATE value - * @property {number} UNCHANGED=5 UNCHANGED value - */ - ResourceChange.Intent = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTENT_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATE"] = 1; - values[valuesById[2] = "UPDATE"] = 2; - values[valuesById[3] = "DELETE"] = 3; - values[valuesById[4] = "RECREATE"] = 4; - values[valuesById[5] = "UNCHANGED"] = 5; - return values; - })(); - - return ResourceChange; - })(); - - v1.PropertyChange = (function() { - - /** - * Properties of a PropertyChange. - * @memberof google.cloud.config.v1 - * @interface IPropertyChange - * @property {string|null} [path] PropertyChange path - * @property {Array.|null} [beforeSensitivePaths] PropertyChange beforeSensitivePaths - * @property {google.protobuf.IValue|null} [before] PropertyChange before - * @property {Array.|null} [afterSensitivePaths] PropertyChange afterSensitivePaths - * @property {google.protobuf.IValue|null} [after] PropertyChange after - */ - - /** - * Constructs a new PropertyChange. - * @memberof google.cloud.config.v1 - * @classdesc Represents a PropertyChange. - * @implements IPropertyChange - * @constructor - * @param {google.cloud.config.v1.IPropertyChange=} [properties] Properties to set - */ - function PropertyChange(properties) { - this.beforeSensitivePaths = []; - this.afterSensitivePaths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PropertyChange path. - * @member {string} path - * @memberof google.cloud.config.v1.PropertyChange - * @instance - */ - PropertyChange.prototype.path = ""; - - /** - * PropertyChange beforeSensitivePaths. - * @member {Array.} beforeSensitivePaths - * @memberof google.cloud.config.v1.PropertyChange - * @instance - */ - PropertyChange.prototype.beforeSensitivePaths = $util.emptyArray; - - /** - * PropertyChange before. - * @member {google.protobuf.IValue|null|undefined} before - * @memberof google.cloud.config.v1.PropertyChange - * @instance - */ - PropertyChange.prototype.before = null; - - /** - * PropertyChange afterSensitivePaths. - * @member {Array.} afterSensitivePaths - * @memberof google.cloud.config.v1.PropertyChange - * @instance - */ - PropertyChange.prototype.afterSensitivePaths = $util.emptyArray; - - /** - * PropertyChange after. - * @member {google.protobuf.IValue|null|undefined} after - * @memberof google.cloud.config.v1.PropertyChange - * @instance - */ - PropertyChange.prototype.after = null; - - /** - * Creates a new PropertyChange instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.PropertyChange - * @static - * @param {google.cloud.config.v1.IPropertyChange=} [properties] Properties to set - * @returns {google.cloud.config.v1.PropertyChange} PropertyChange instance - */ - PropertyChange.create = function create(properties) { - return new PropertyChange(properties); - }; - - /** - * Encodes the specified PropertyChange message. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.PropertyChange - * @static - * @param {google.cloud.config.v1.IPropertyChange} message PropertyChange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PropertyChange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.beforeSensitivePaths != null && message.beforeSensitivePaths.length) - for (var i = 0; i < message.beforeSensitivePaths.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.beforeSensitivePaths[i]); - if (message.before != null && Object.hasOwnProperty.call(message, "before")) - $root.google.protobuf.Value.encode(message.before, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.afterSensitivePaths != null && message.afterSensitivePaths.length) - for (var i = 0; i < message.afterSensitivePaths.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.afterSensitivePaths[i]); - if (message.after != null && Object.hasOwnProperty.call(message, "after")) - $root.google.protobuf.Value.encode(message.after, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PropertyChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.PropertyChange - * @static - * @param {google.cloud.config.v1.IPropertyChange} message PropertyChange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PropertyChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PropertyChange message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.PropertyChange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.PropertyChange} PropertyChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PropertyChange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PropertyChange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.path = reader.string(); - break; - } - case 2: { - if (!(message.beforeSensitivePaths && message.beforeSensitivePaths.length)) - message.beforeSensitivePaths = []; - message.beforeSensitivePaths.push(reader.string()); - break; - } - case 3: { - message.before = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.afterSensitivePaths && message.afterSensitivePaths.length)) - message.afterSensitivePaths = []; - message.afterSensitivePaths.push(reader.string()); - break; - } - case 5: { - message.after = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PropertyChange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.PropertyChange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.PropertyChange} PropertyChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PropertyChange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PropertyChange message. - * @function verify - * @memberof google.cloud.config.v1.PropertyChange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PropertyChange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.beforeSensitivePaths != null && message.hasOwnProperty("beforeSensitivePaths")) { - if (!Array.isArray(message.beforeSensitivePaths)) - return "beforeSensitivePaths: array expected"; - for (var i = 0; i < message.beforeSensitivePaths.length; ++i) - if (!$util.isString(message.beforeSensitivePaths[i])) - return "beforeSensitivePaths: string[] expected"; - } - if (message.before != null && message.hasOwnProperty("before")) { - var error = $root.google.protobuf.Value.verify(message.before); - if (error) - return "before." + error; - } - if (message.afterSensitivePaths != null && message.hasOwnProperty("afterSensitivePaths")) { - if (!Array.isArray(message.afterSensitivePaths)) - return "afterSensitivePaths: array expected"; - for (var i = 0; i < message.afterSensitivePaths.length; ++i) - if (!$util.isString(message.afterSensitivePaths[i])) - return "afterSensitivePaths: string[] expected"; - } - if (message.after != null && message.hasOwnProperty("after")) { - var error = $root.google.protobuf.Value.verify(message.after); - if (error) - return "after." + error; - } - return null; - }; - - /** - * Creates a PropertyChange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.PropertyChange - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.PropertyChange} PropertyChange - */ - PropertyChange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.PropertyChange) - return object; - var message = new $root.google.cloud.config.v1.PropertyChange(); - if (object.path != null) - message.path = String(object.path); - if (object.beforeSensitivePaths) { - if (!Array.isArray(object.beforeSensitivePaths)) - throw TypeError(".google.cloud.config.v1.PropertyChange.beforeSensitivePaths: array expected"); - message.beforeSensitivePaths = []; - for (var i = 0; i < object.beforeSensitivePaths.length; ++i) - message.beforeSensitivePaths[i] = String(object.beforeSensitivePaths[i]); - } - if (object.before != null) { - if (typeof object.before !== "object") - throw TypeError(".google.cloud.config.v1.PropertyChange.before: object expected"); - message.before = $root.google.protobuf.Value.fromObject(object.before); - } - if (object.afterSensitivePaths) { - if (!Array.isArray(object.afterSensitivePaths)) - throw TypeError(".google.cloud.config.v1.PropertyChange.afterSensitivePaths: array expected"); - message.afterSensitivePaths = []; - for (var i = 0; i < object.afterSensitivePaths.length; ++i) - message.afterSensitivePaths[i] = String(object.afterSensitivePaths[i]); - } - if (object.after != null) { - if (typeof object.after !== "object") - throw TypeError(".google.cloud.config.v1.PropertyChange.after: object expected"); - message.after = $root.google.protobuf.Value.fromObject(object.after); - } - return message; - }; - - /** - * Creates a plain object from a PropertyChange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.PropertyChange - * @static - * @param {google.cloud.config.v1.PropertyChange} message PropertyChange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PropertyChange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.beforeSensitivePaths = []; - object.afterSensitivePaths = []; - } - if (options.defaults) { - object.path = ""; - object.before = null; - object.after = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.beforeSensitivePaths && message.beforeSensitivePaths.length) { - object.beforeSensitivePaths = []; - for (var j = 0; j < message.beforeSensitivePaths.length; ++j) - object.beforeSensitivePaths[j] = message.beforeSensitivePaths[j]; - } - if (message.before != null && message.hasOwnProperty("before")) - object.before = $root.google.protobuf.Value.toObject(message.before, options); - if (message.afterSensitivePaths && message.afterSensitivePaths.length) { - object.afterSensitivePaths = []; - for (var j = 0; j < message.afterSensitivePaths.length; ++j) - object.afterSensitivePaths[j] = message.afterSensitivePaths[j]; - } - if (message.after != null && message.hasOwnProperty("after")) - object.after = $root.google.protobuf.Value.toObject(message.after, options); - return object; - }; - - /** - * Converts this PropertyChange to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.PropertyChange - * @instance - * @returns {Object.} JSON object - */ - PropertyChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PropertyChange - * @function getTypeUrl - * @memberof google.cloud.config.v1.PropertyChange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PropertyChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.PropertyChange"; - }; - - return PropertyChange; - })(); - - v1.ListResourceChangesRequest = (function() { - - /** - * Properties of a ListResourceChangesRequest. - * @memberof google.cloud.config.v1 - * @interface IListResourceChangesRequest - * @property {string|null} [parent] ListResourceChangesRequest parent - * @property {number|null} [pageSize] ListResourceChangesRequest pageSize - * @property {string|null} [pageToken] ListResourceChangesRequest pageToken - * @property {string|null} [filter] ListResourceChangesRequest filter - * @property {string|null} [orderBy] ListResourceChangesRequest orderBy - */ - - /** - * Constructs a new ListResourceChangesRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListResourceChangesRequest. - * @implements IListResourceChangesRequest - * @constructor - * @param {google.cloud.config.v1.IListResourceChangesRequest=} [properties] Properties to set - */ - function ListResourceChangesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListResourceChangesRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @instance - */ - ListResourceChangesRequest.prototype.parent = ""; - - /** - * ListResourceChangesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @instance - */ - ListResourceChangesRequest.prototype.pageSize = 0; - - /** - * ListResourceChangesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @instance - */ - ListResourceChangesRequest.prototype.pageToken = ""; - - /** - * ListResourceChangesRequest filter. - * @member {string} filter - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @instance - */ - ListResourceChangesRequest.prototype.filter = ""; - - /** - * ListResourceChangesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @instance - */ - ListResourceChangesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListResourceChangesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @static - * @param {google.cloud.config.v1.IListResourceChangesRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest instance - */ - ListResourceChangesRequest.create = function create(properties) { - return new ListResourceChangesRequest(properties); - }; - - /** - * Encodes the specified ListResourceChangesRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @static - * @param {google.cloud.config.v1.IListResourceChangesRequest} message ListResourceChangesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourceChangesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListResourceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @static - * @param {google.cloud.config.v1.IListResourceChangesRequest} message ListResourceChangesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListResourceChangesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourceChangesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceChangesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListResourceChangesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourceChangesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListResourceChangesRequest message. - * @function verify - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListResourceChangesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListResourceChangesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest - */ - ListResourceChangesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListResourceChangesRequest) - return object; - var message = new $root.google.cloud.config.v1.ListResourceChangesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListResourceChangesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @static - * @param {google.cloud.config.v1.ListResourceChangesRequest} message ListResourceChangesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListResourceChangesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListResourceChangesRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @instance - * @returns {Object.} JSON object - */ - ListResourceChangesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListResourceChangesRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListResourceChangesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListResourceChangesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListResourceChangesRequest"; - }; - - return ListResourceChangesRequest; - })(); - - v1.ListResourceChangesResponse = (function() { - - /** - * Properties of a ListResourceChangesResponse. - * @memberof google.cloud.config.v1 - * @interface IListResourceChangesResponse - * @property {Array.|null} [resourceChanges] ListResourceChangesResponse resourceChanges - * @property {string|null} [nextPageToken] ListResourceChangesResponse nextPageToken - * @property {Array.|null} [unreachable] ListResourceChangesResponse unreachable - */ - - /** - * Constructs a new ListResourceChangesResponse. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListResourceChangesResponse. - * @implements IListResourceChangesResponse - * @constructor - * @param {google.cloud.config.v1.IListResourceChangesResponse=} [properties] Properties to set - */ - function ListResourceChangesResponse(properties) { - this.resourceChanges = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListResourceChangesResponse resourceChanges. - * @member {Array.} resourceChanges - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @instance - */ - ListResourceChangesResponse.prototype.resourceChanges = $util.emptyArray; - - /** - * ListResourceChangesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @instance - */ - ListResourceChangesResponse.prototype.nextPageToken = ""; - - /** - * ListResourceChangesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @instance - */ - ListResourceChangesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListResourceChangesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @static - * @param {google.cloud.config.v1.IListResourceChangesResponse=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse instance - */ - ListResourceChangesResponse.create = function create(properties) { - return new ListResourceChangesResponse(properties); - }; - - /** - * Encodes the specified ListResourceChangesResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @static - * @param {google.cloud.config.v1.IListResourceChangesResponse} message ListResourceChangesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourceChangesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceChanges != null && message.resourceChanges.length) - for (var i = 0; i < message.resourceChanges.length; ++i) - $root.google.cloud.config.v1.ResourceChange.encode(message.resourceChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListResourceChangesResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @static - * @param {google.cloud.config.v1.IListResourceChangesResponse} message ListResourceChangesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourceChangesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListResourceChangesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourceChangesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceChangesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.resourceChanges && message.resourceChanges.length)) - message.resourceChanges = []; - message.resourceChanges.push($root.google.cloud.config.v1.ResourceChange.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListResourceChangesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourceChangesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListResourceChangesResponse message. - * @function verify - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListResourceChangesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceChanges != null && message.hasOwnProperty("resourceChanges")) { - if (!Array.isArray(message.resourceChanges)) - return "resourceChanges: array expected"; - for (var i = 0; i < message.resourceChanges.length; ++i) { - var error = $root.google.cloud.config.v1.ResourceChange.verify(message.resourceChanges[i]); - if (error) - return "resourceChanges." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListResourceChangesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse - */ - ListResourceChangesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListResourceChangesResponse) - return object; - var message = new $root.google.cloud.config.v1.ListResourceChangesResponse(); - if (object.resourceChanges) { - if (!Array.isArray(object.resourceChanges)) - throw TypeError(".google.cloud.config.v1.ListResourceChangesResponse.resourceChanges: array expected"); - message.resourceChanges = []; - for (var i = 0; i < object.resourceChanges.length; ++i) { - if (typeof object.resourceChanges[i] !== "object") - throw TypeError(".google.cloud.config.v1.ListResourceChangesResponse.resourceChanges: object expected"); - message.resourceChanges[i] = $root.google.cloud.config.v1.ResourceChange.fromObject(object.resourceChanges[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.config.v1.ListResourceChangesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListResourceChangesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @static - * @param {google.cloud.config.v1.ListResourceChangesResponse} message ListResourceChangesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListResourceChangesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resourceChanges = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.resourceChanges && message.resourceChanges.length) { - object.resourceChanges = []; - for (var j = 0; j < message.resourceChanges.length; ++j) - object.resourceChanges[j] = $root.google.cloud.config.v1.ResourceChange.toObject(message.resourceChanges[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListResourceChangesResponse to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @instance - * @returns {Object.} JSON object - */ - ListResourceChangesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListResourceChangesResponse - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListResourceChangesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListResourceChangesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListResourceChangesResponse"; - }; - - return ListResourceChangesResponse; - })(); - - v1.GetResourceChangeRequest = (function() { - - /** - * Properties of a GetResourceChangeRequest. - * @memberof google.cloud.config.v1 - * @interface IGetResourceChangeRequest - * @property {string|null} [name] GetResourceChangeRequest name - */ - - /** - * Constructs a new GetResourceChangeRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a GetResourceChangeRequest. - * @implements IGetResourceChangeRequest - * @constructor - * @param {google.cloud.config.v1.IGetResourceChangeRequest=} [properties] Properties to set - */ - function GetResourceChangeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetResourceChangeRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.GetResourceChangeRequest - * @instance - */ - GetResourceChangeRequest.prototype.name = ""; - - /** - * Creates a new GetResourceChangeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.GetResourceChangeRequest - * @static - * @param {google.cloud.config.v1.IGetResourceChangeRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest instance - */ - GetResourceChangeRequest.create = function create(properties) { - return new GetResourceChangeRequest(properties); - }; - - /** - * Encodes the specified GetResourceChangeRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.GetResourceChangeRequest - * @static - * @param {google.cloud.config.v1.IGetResourceChangeRequest} message GetResourceChangeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetResourceChangeRequest.encode = function encode(message, writer) { - 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 GetResourceChangeRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.GetResourceChangeRequest - * @static - * @param {google.cloud.config.v1.IGetResourceChangeRequest} message GetResourceChangeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetResourceChangeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetResourceChangeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.GetResourceChangeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetResourceChangeRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetResourceChangeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetResourceChangeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.GetResourceChangeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetResourceChangeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetResourceChangeRequest message. - * @function verify - * @memberof google.cloud.config.v1.GetResourceChangeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetResourceChangeRequest.verify = function verify(message) { - if (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 GetResourceChangeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.GetResourceChangeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest - */ - GetResourceChangeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.GetResourceChangeRequest) - return object; - var message = new $root.google.cloud.config.v1.GetResourceChangeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetResourceChangeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.GetResourceChangeRequest - * @static - * @param {google.cloud.config.v1.GetResourceChangeRequest} message GetResourceChangeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetResourceChangeRequest.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 GetResourceChangeRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.GetResourceChangeRequest - * @instance - * @returns {Object.} JSON object - */ - GetResourceChangeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetResourceChangeRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.GetResourceChangeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetResourceChangeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.GetResourceChangeRequest"; - }; - - return GetResourceChangeRequest; - })(); - - v1.ResourceDriftTerraformInfo = (function() { - - /** - * Properties of a ResourceDriftTerraformInfo. - * @memberof google.cloud.config.v1 - * @interface IResourceDriftTerraformInfo - * @property {string|null} [address] ResourceDriftTerraformInfo address - * @property {string|null} [type] ResourceDriftTerraformInfo type - * @property {string|null} [resourceName] ResourceDriftTerraformInfo resourceName - * @property {string|null} [provider] ResourceDriftTerraformInfo provider - */ - - /** - * Constructs a new ResourceDriftTerraformInfo. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ResourceDriftTerraformInfo. - * @implements IResourceDriftTerraformInfo - * @constructor - * @param {google.cloud.config.v1.IResourceDriftTerraformInfo=} [properties] Properties to set - */ - function ResourceDriftTerraformInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDriftTerraformInfo address. - * @member {string} address - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @instance - */ - ResourceDriftTerraformInfo.prototype.address = ""; - - /** - * ResourceDriftTerraformInfo type. - * @member {string} type - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @instance - */ - ResourceDriftTerraformInfo.prototype.type = ""; - - /** - * ResourceDriftTerraformInfo resourceName. - * @member {string} resourceName - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @instance - */ - ResourceDriftTerraformInfo.prototype.resourceName = ""; - - /** - * ResourceDriftTerraformInfo provider. - * @member {string} provider - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @instance - */ - ResourceDriftTerraformInfo.prototype.provider = ""; - - /** - * Creates a new ResourceDriftTerraformInfo instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @static - * @param {google.cloud.config.v1.IResourceDriftTerraformInfo=} [properties] Properties to set - * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo instance - */ - ResourceDriftTerraformInfo.create = function create(properties) { - return new ResourceDriftTerraformInfo(properties); - }; - - /** - * Encodes the specified ResourceDriftTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @static - * @param {google.cloud.config.v1.IResourceDriftTerraformInfo} message ResourceDriftTerraformInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDriftTerraformInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); - if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); - if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.provider); - return writer; - }; - - /** - * Encodes the specified ResourceDriftTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @static - * @param {google.cloud.config.v1.IResourceDriftTerraformInfo} message ResourceDriftTerraformInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDriftTerraformInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDriftTerraformInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceDriftTerraformInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.address = reader.string(); - break; - } - case 2: { - message.type = reader.string(); - break; - } - case 3: { - message.resourceName = reader.string(); - break; - } - case 4: { - message.provider = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDriftTerraformInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDriftTerraformInfo message. - * @function verify - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDriftTerraformInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - if (!$util.isString(message.resourceName)) - return "resourceName: string expected"; - if (message.provider != null && message.hasOwnProperty("provider")) - if (!$util.isString(message.provider)) - return "provider: string expected"; - return null; - }; - - /** - * Creates a ResourceDriftTerraformInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo - */ - ResourceDriftTerraformInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ResourceDriftTerraformInfo) - return object; - var message = new $root.google.cloud.config.v1.ResourceDriftTerraformInfo(); - if (object.address != null) - message.address = String(object.address); - if (object.type != null) - message.type = String(object.type); - if (object.resourceName != null) - message.resourceName = String(object.resourceName); - if (object.provider != null) - message.provider = String(object.provider); - return message; - }; - - /** - * Creates a plain object from a ResourceDriftTerraformInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @static - * @param {google.cloud.config.v1.ResourceDriftTerraformInfo} message ResourceDriftTerraformInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDriftTerraformInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.address = ""; - object.type = ""; - object.resourceName = ""; - object.provider = ""; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - object.resourceName = message.resourceName; - if (message.provider != null && message.hasOwnProperty("provider")) - object.provider = message.provider; - return object; - }; - - /** - * Converts this ResourceDriftTerraformInfo to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @instance - * @returns {Object.} JSON object - */ - ResourceDriftTerraformInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDriftTerraformInfo - * @function getTypeUrl - * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDriftTerraformInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ResourceDriftTerraformInfo"; - }; - - return ResourceDriftTerraformInfo; - })(); - - v1.ResourceDrift = (function() { - - /** - * Properties of a ResourceDrift. - * @memberof google.cloud.config.v1 - * @interface IResourceDrift - * @property {string|null} [name] ResourceDrift name - * @property {google.cloud.config.v1.IResourceDriftTerraformInfo|null} [terraformInfo] ResourceDrift terraformInfo - * @property {Array.|null} [propertyDrifts] ResourceDrift propertyDrifts - */ - - /** - * Constructs a new ResourceDrift. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ResourceDrift. - * @implements IResourceDrift - * @constructor - * @param {google.cloud.config.v1.IResourceDrift=} [properties] Properties to set - */ - function ResourceDrift(properties) { - this.propertyDrifts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDrift name. - * @member {string} name - * @memberof google.cloud.config.v1.ResourceDrift - * @instance - */ - ResourceDrift.prototype.name = ""; - - /** - * ResourceDrift terraformInfo. - * @member {google.cloud.config.v1.IResourceDriftTerraformInfo|null|undefined} terraformInfo - * @memberof google.cloud.config.v1.ResourceDrift - * @instance - */ - ResourceDrift.prototype.terraformInfo = null; - - /** - * ResourceDrift propertyDrifts. - * @member {Array.} propertyDrifts - * @memberof google.cloud.config.v1.ResourceDrift - * @instance - */ - ResourceDrift.prototype.propertyDrifts = $util.emptyArray; - - /** - * Creates a new ResourceDrift instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ResourceDrift - * @static - * @param {google.cloud.config.v1.IResourceDrift=} [properties] Properties to set - * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift instance - */ - ResourceDrift.create = function create(properties) { - return new ResourceDrift(properties); - }; - - /** - * Encodes the specified ResourceDrift message. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ResourceDrift - * @static - * @param {google.cloud.config.v1.IResourceDrift} message ResourceDrift message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDrift.encode = function encode(message, writer) { - 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.terraformInfo != null && Object.hasOwnProperty.call(message, "terraformInfo")) - $root.google.cloud.config.v1.ResourceDriftTerraformInfo.encode(message.terraformInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.propertyDrifts != null && message.propertyDrifts.length) - for (var i = 0; i < message.propertyDrifts.length; ++i) - $root.google.cloud.config.v1.PropertyDrift.encode(message.propertyDrifts[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResourceDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ResourceDrift - * @static - * @param {google.cloud.config.v1.IResourceDrift} message ResourceDrift message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDrift.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDrift message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ResourceDrift - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDrift.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceDrift(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.terraformInfo = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.propertyDrifts && message.propertyDrifts.length)) - message.propertyDrifts = []; - message.propertyDrifts.push($root.google.cloud.config.v1.PropertyDrift.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDrift message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ResourceDrift - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDrift.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDrift message. - * @function verify - * @memberof google.cloud.config.v1.ResourceDrift - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDrift.verify = function verify(message) { - if (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.terraformInfo != null && message.hasOwnProperty("terraformInfo")) { - var error = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.verify(message.terraformInfo); - if (error) - return "terraformInfo." + error; - } - if (message.propertyDrifts != null && message.hasOwnProperty("propertyDrifts")) { - if (!Array.isArray(message.propertyDrifts)) - return "propertyDrifts: array expected"; - for (var i = 0; i < message.propertyDrifts.length; ++i) { - var error = $root.google.cloud.config.v1.PropertyDrift.verify(message.propertyDrifts[i]); - if (error) - return "propertyDrifts." + error; - } - } - return null; - }; - - /** - * Creates a ResourceDrift message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ResourceDrift - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift - */ - ResourceDrift.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ResourceDrift) - return object; - var message = new $root.google.cloud.config.v1.ResourceDrift(); - if (object.name != null) - message.name = String(object.name); - if (object.terraformInfo != null) { - if (typeof object.terraformInfo !== "object") - throw TypeError(".google.cloud.config.v1.ResourceDrift.terraformInfo: object expected"); - message.terraformInfo = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.fromObject(object.terraformInfo); - } - if (object.propertyDrifts) { - if (!Array.isArray(object.propertyDrifts)) - throw TypeError(".google.cloud.config.v1.ResourceDrift.propertyDrifts: array expected"); - message.propertyDrifts = []; - for (var i = 0; i < object.propertyDrifts.length; ++i) { - if (typeof object.propertyDrifts[i] !== "object") - throw TypeError(".google.cloud.config.v1.ResourceDrift.propertyDrifts: object expected"); - message.propertyDrifts[i] = $root.google.cloud.config.v1.PropertyDrift.fromObject(object.propertyDrifts[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDrift message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ResourceDrift - * @static - * @param {google.cloud.config.v1.ResourceDrift} message ResourceDrift - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDrift.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.propertyDrifts = []; - if (options.defaults) { - object.name = ""; - object.terraformInfo = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.terraformInfo != null && message.hasOwnProperty("terraformInfo")) - object.terraformInfo = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.toObject(message.terraformInfo, options); - if (message.propertyDrifts && message.propertyDrifts.length) { - object.propertyDrifts = []; - for (var j = 0; j < message.propertyDrifts.length; ++j) - object.propertyDrifts[j] = $root.google.cloud.config.v1.PropertyDrift.toObject(message.propertyDrifts[j], options); - } - return object; - }; - - /** - * Converts this ResourceDrift to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ResourceDrift - * @instance - * @returns {Object.} JSON object - */ - ResourceDrift.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDrift - * @function getTypeUrl - * @memberof google.cloud.config.v1.ResourceDrift - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDrift.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ResourceDrift"; - }; - - return ResourceDrift; - })(); - - v1.PropertyDrift = (function() { - - /** - * Properties of a PropertyDrift. - * @memberof google.cloud.config.v1 - * @interface IPropertyDrift - * @property {string|null} [path] PropertyDrift path - * @property {Array.|null} [beforeSensitivePaths] PropertyDrift beforeSensitivePaths - * @property {google.protobuf.IValue|null} [before] PropertyDrift before - * @property {Array.|null} [afterSensitivePaths] PropertyDrift afterSensitivePaths - * @property {google.protobuf.IValue|null} [after] PropertyDrift after - */ - - /** - * Constructs a new PropertyDrift. - * @memberof google.cloud.config.v1 - * @classdesc Represents a PropertyDrift. - * @implements IPropertyDrift - * @constructor - * @param {google.cloud.config.v1.IPropertyDrift=} [properties] Properties to set - */ - function PropertyDrift(properties) { - this.beforeSensitivePaths = []; - this.afterSensitivePaths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PropertyDrift path. - * @member {string} path - * @memberof google.cloud.config.v1.PropertyDrift - * @instance - */ - PropertyDrift.prototype.path = ""; - - /** - * PropertyDrift beforeSensitivePaths. - * @member {Array.} beforeSensitivePaths - * @memberof google.cloud.config.v1.PropertyDrift - * @instance - */ - PropertyDrift.prototype.beforeSensitivePaths = $util.emptyArray; - - /** - * PropertyDrift before. - * @member {google.protobuf.IValue|null|undefined} before - * @memberof google.cloud.config.v1.PropertyDrift - * @instance - */ - PropertyDrift.prototype.before = null; - - /** - * PropertyDrift afterSensitivePaths. - * @member {Array.} afterSensitivePaths - * @memberof google.cloud.config.v1.PropertyDrift - * @instance - */ - PropertyDrift.prototype.afterSensitivePaths = $util.emptyArray; - - /** - * PropertyDrift after. - * @member {google.protobuf.IValue|null|undefined} after - * @memberof google.cloud.config.v1.PropertyDrift - * @instance - */ - PropertyDrift.prototype.after = null; - - /** - * Creates a new PropertyDrift instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.PropertyDrift - * @static - * @param {google.cloud.config.v1.IPropertyDrift=} [properties] Properties to set - * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift instance - */ - PropertyDrift.create = function create(properties) { - return new PropertyDrift(properties); - }; - - /** - * Encodes the specified PropertyDrift message. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.PropertyDrift - * @static - * @param {google.cloud.config.v1.IPropertyDrift} message PropertyDrift message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PropertyDrift.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.beforeSensitivePaths != null && message.beforeSensitivePaths.length) - for (var i = 0; i < message.beforeSensitivePaths.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.beforeSensitivePaths[i]); - if (message.before != null && Object.hasOwnProperty.call(message, "before")) - $root.google.protobuf.Value.encode(message.before, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.afterSensitivePaths != null && message.afterSensitivePaths.length) - for (var i = 0; i < message.afterSensitivePaths.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.afterSensitivePaths[i]); - if (message.after != null && Object.hasOwnProperty.call(message, "after")) - $root.google.protobuf.Value.encode(message.after, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PropertyDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.PropertyDrift - * @static - * @param {google.cloud.config.v1.IPropertyDrift} message PropertyDrift message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PropertyDrift.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PropertyDrift message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.PropertyDrift - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PropertyDrift.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PropertyDrift(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.path = reader.string(); - break; - } - case 2: { - if (!(message.beforeSensitivePaths && message.beforeSensitivePaths.length)) - message.beforeSensitivePaths = []; - message.beforeSensitivePaths.push(reader.string()); - break; - } - case 3: { - message.before = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.afterSensitivePaths && message.afterSensitivePaths.length)) - message.afterSensitivePaths = []; - message.afterSensitivePaths.push(reader.string()); - break; - } - case 5: { - message.after = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PropertyDrift message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.PropertyDrift - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PropertyDrift.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PropertyDrift message. - * @function verify - * @memberof google.cloud.config.v1.PropertyDrift - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PropertyDrift.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.beforeSensitivePaths != null && message.hasOwnProperty("beforeSensitivePaths")) { - if (!Array.isArray(message.beforeSensitivePaths)) - return "beforeSensitivePaths: array expected"; - for (var i = 0; i < message.beforeSensitivePaths.length; ++i) - if (!$util.isString(message.beforeSensitivePaths[i])) - return "beforeSensitivePaths: string[] expected"; - } - if (message.before != null && message.hasOwnProperty("before")) { - var error = $root.google.protobuf.Value.verify(message.before); - if (error) - return "before." + error; - } - if (message.afterSensitivePaths != null && message.hasOwnProperty("afterSensitivePaths")) { - if (!Array.isArray(message.afterSensitivePaths)) - return "afterSensitivePaths: array expected"; - for (var i = 0; i < message.afterSensitivePaths.length; ++i) - if (!$util.isString(message.afterSensitivePaths[i])) - return "afterSensitivePaths: string[] expected"; - } - if (message.after != null && message.hasOwnProperty("after")) { - var error = $root.google.protobuf.Value.verify(message.after); - if (error) - return "after." + error; - } - return null; - }; - - /** - * Creates a PropertyDrift message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.PropertyDrift - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift - */ - PropertyDrift.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.PropertyDrift) - return object; - var message = new $root.google.cloud.config.v1.PropertyDrift(); - if (object.path != null) - message.path = String(object.path); - if (object.beforeSensitivePaths) { - if (!Array.isArray(object.beforeSensitivePaths)) - throw TypeError(".google.cloud.config.v1.PropertyDrift.beforeSensitivePaths: array expected"); - message.beforeSensitivePaths = []; - for (var i = 0; i < object.beforeSensitivePaths.length; ++i) - message.beforeSensitivePaths[i] = String(object.beforeSensitivePaths[i]); - } - if (object.before != null) { - if (typeof object.before !== "object") - throw TypeError(".google.cloud.config.v1.PropertyDrift.before: object expected"); - message.before = $root.google.protobuf.Value.fromObject(object.before); - } - if (object.afterSensitivePaths) { - if (!Array.isArray(object.afterSensitivePaths)) - throw TypeError(".google.cloud.config.v1.PropertyDrift.afterSensitivePaths: array expected"); - message.afterSensitivePaths = []; - for (var i = 0; i < object.afterSensitivePaths.length; ++i) - message.afterSensitivePaths[i] = String(object.afterSensitivePaths[i]); - } - if (object.after != null) { - if (typeof object.after !== "object") - throw TypeError(".google.cloud.config.v1.PropertyDrift.after: object expected"); - message.after = $root.google.protobuf.Value.fromObject(object.after); - } - return message; - }; - - /** - * Creates a plain object from a PropertyDrift message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.PropertyDrift - * @static - * @param {google.cloud.config.v1.PropertyDrift} message PropertyDrift - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PropertyDrift.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.beforeSensitivePaths = []; - object.afterSensitivePaths = []; - } - if (options.defaults) { - object.path = ""; - object.before = null; - object.after = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.beforeSensitivePaths && message.beforeSensitivePaths.length) { - object.beforeSensitivePaths = []; - for (var j = 0; j < message.beforeSensitivePaths.length; ++j) - object.beforeSensitivePaths[j] = message.beforeSensitivePaths[j]; - } - if (message.before != null && message.hasOwnProperty("before")) - object.before = $root.google.protobuf.Value.toObject(message.before, options); - if (message.afterSensitivePaths && message.afterSensitivePaths.length) { - object.afterSensitivePaths = []; - for (var j = 0; j < message.afterSensitivePaths.length; ++j) - object.afterSensitivePaths[j] = message.afterSensitivePaths[j]; - } - if (message.after != null && message.hasOwnProperty("after")) - object.after = $root.google.protobuf.Value.toObject(message.after, options); - return object; - }; - - /** - * Converts this PropertyDrift to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.PropertyDrift - * @instance - * @returns {Object.} JSON object - */ - PropertyDrift.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PropertyDrift - * @function getTypeUrl - * @memberof google.cloud.config.v1.PropertyDrift - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PropertyDrift.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.PropertyDrift"; - }; - - return PropertyDrift; - })(); - - v1.ListResourceDriftsRequest = (function() { - - /** - * Properties of a ListResourceDriftsRequest. - * @memberof google.cloud.config.v1 - * @interface IListResourceDriftsRequest - * @property {string|null} [parent] ListResourceDriftsRequest parent - * @property {number|null} [pageSize] ListResourceDriftsRequest pageSize - * @property {string|null} [pageToken] ListResourceDriftsRequest pageToken - * @property {string|null} [filter] ListResourceDriftsRequest filter - * @property {string|null} [orderBy] ListResourceDriftsRequest orderBy - */ - - /** - * Constructs a new ListResourceDriftsRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListResourceDriftsRequest. - * @implements IListResourceDriftsRequest - * @constructor - * @param {google.cloud.config.v1.IListResourceDriftsRequest=} [properties] Properties to set - */ - function ListResourceDriftsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListResourceDriftsRequest parent. - * @member {string} parent - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @instance - */ - ListResourceDriftsRequest.prototype.parent = ""; - - /** - * ListResourceDriftsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @instance - */ - ListResourceDriftsRequest.prototype.pageSize = 0; - - /** - * ListResourceDriftsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @instance - */ - ListResourceDriftsRequest.prototype.pageToken = ""; - - /** - * ListResourceDriftsRequest filter. - * @member {string} filter - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @instance - */ - ListResourceDriftsRequest.prototype.filter = ""; - - /** - * ListResourceDriftsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @instance - */ - ListResourceDriftsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListResourceDriftsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @static - * @param {google.cloud.config.v1.IListResourceDriftsRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest instance - */ - ListResourceDriftsRequest.create = function create(properties) { - return new ListResourceDriftsRequest(properties); - }; - - /** - * Encodes the specified ListResourceDriftsRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @static - * @param {google.cloud.config.v1.IListResourceDriftsRequest} message ListResourceDriftsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourceDriftsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListResourceDriftsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @static - * @param {google.cloud.config.v1.IListResourceDriftsRequest} message ListResourceDriftsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourceDriftsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListResourceDriftsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourceDriftsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceDriftsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListResourceDriftsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourceDriftsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListResourceDriftsRequest message. - * @function verify - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListResourceDriftsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListResourceDriftsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest - */ - ListResourceDriftsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListResourceDriftsRequest) - return object; - var message = new $root.google.cloud.config.v1.ListResourceDriftsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListResourceDriftsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @static - * @param {google.cloud.config.v1.ListResourceDriftsRequest} message ListResourceDriftsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListResourceDriftsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListResourceDriftsRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @instance - * @returns {Object.} JSON object - */ - ListResourceDriftsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListResourceDriftsRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListResourceDriftsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListResourceDriftsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListResourceDriftsRequest"; - }; - - return ListResourceDriftsRequest; - })(); - - v1.ListResourceDriftsResponse = (function() { - - /** - * Properties of a ListResourceDriftsResponse. - * @memberof google.cloud.config.v1 - * @interface IListResourceDriftsResponse - * @property {Array.|null} [resourceDrifts] ListResourceDriftsResponse resourceDrifts - * @property {string|null} [nextPageToken] ListResourceDriftsResponse nextPageToken - * @property {Array.|null} [unreachable] ListResourceDriftsResponse unreachable - */ - - /** - * Constructs a new ListResourceDriftsResponse. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ListResourceDriftsResponse. - * @implements IListResourceDriftsResponse - * @constructor - * @param {google.cloud.config.v1.IListResourceDriftsResponse=} [properties] Properties to set - */ - function ListResourceDriftsResponse(properties) { - this.resourceDrifts = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListResourceDriftsResponse resourceDrifts. - * @member {Array.} resourceDrifts - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @instance - */ - ListResourceDriftsResponse.prototype.resourceDrifts = $util.emptyArray; - - /** - * ListResourceDriftsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @instance - */ - ListResourceDriftsResponse.prototype.nextPageToken = ""; - - /** - * ListResourceDriftsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @instance - */ - ListResourceDriftsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListResourceDriftsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @static - * @param {google.cloud.config.v1.IListResourceDriftsResponse=} [properties] Properties to set - * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse instance - */ - ListResourceDriftsResponse.create = function create(properties) { - return new ListResourceDriftsResponse(properties); - }; - - /** - * Encodes the specified ListResourceDriftsResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @static - * @param {google.cloud.config.v1.IListResourceDriftsResponse} message ListResourceDriftsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourceDriftsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceDrifts != null && message.resourceDrifts.length) - for (var i = 0; i < message.resourceDrifts.length; ++i) - $root.google.cloud.config.v1.ResourceDrift.encode(message.resourceDrifts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListResourceDriftsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @static - * @param {google.cloud.config.v1.IListResourceDriftsResponse} message ListResourceDriftsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResourceDriftsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListResourceDriftsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourceDriftsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceDriftsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.resourceDrifts && message.resourceDrifts.length)) - message.resourceDrifts = []; - message.resourceDrifts.push($root.google.cloud.config.v1.ResourceDrift.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListResourceDriftsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResourceDriftsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListResourceDriftsResponse message. - * @function verify - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListResourceDriftsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceDrifts != null && message.hasOwnProperty("resourceDrifts")) { - if (!Array.isArray(message.resourceDrifts)) - return "resourceDrifts: array expected"; - for (var i = 0; i < message.resourceDrifts.length; ++i) { - var error = $root.google.cloud.config.v1.ResourceDrift.verify(message.resourceDrifts[i]); - if (error) - return "resourceDrifts." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListResourceDriftsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse - */ - ListResourceDriftsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ListResourceDriftsResponse) - return object; - var message = new $root.google.cloud.config.v1.ListResourceDriftsResponse(); - if (object.resourceDrifts) { - if (!Array.isArray(object.resourceDrifts)) - throw TypeError(".google.cloud.config.v1.ListResourceDriftsResponse.resourceDrifts: array expected"); - message.resourceDrifts = []; - for (var i = 0; i < object.resourceDrifts.length; ++i) { - if (typeof object.resourceDrifts[i] !== "object") - throw TypeError(".google.cloud.config.v1.ListResourceDriftsResponse.resourceDrifts: object expected"); - message.resourceDrifts[i] = $root.google.cloud.config.v1.ResourceDrift.fromObject(object.resourceDrifts[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.config.v1.ListResourceDriftsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListResourceDriftsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @static - * @param {google.cloud.config.v1.ListResourceDriftsResponse} message ListResourceDriftsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListResourceDriftsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resourceDrifts = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.resourceDrifts && message.resourceDrifts.length) { - object.resourceDrifts = []; - for (var j = 0; j < message.resourceDrifts.length; ++j) - object.resourceDrifts[j] = $root.google.cloud.config.v1.ResourceDrift.toObject(message.resourceDrifts[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListResourceDriftsResponse to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @instance - * @returns {Object.} JSON object - */ - ListResourceDriftsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListResourceDriftsResponse - * @function getTypeUrl - * @memberof google.cloud.config.v1.ListResourceDriftsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListResourceDriftsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ListResourceDriftsResponse"; - }; - - return ListResourceDriftsResponse; - })(); - - v1.GetResourceDriftRequest = (function() { - - /** - * Properties of a GetResourceDriftRequest. - * @memberof google.cloud.config.v1 - * @interface IGetResourceDriftRequest - * @property {string|null} [name] GetResourceDriftRequest name - */ - - /** - * Constructs a new GetResourceDriftRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a GetResourceDriftRequest. - * @implements IGetResourceDriftRequest - * @constructor - * @param {google.cloud.config.v1.IGetResourceDriftRequest=} [properties] Properties to set - */ - function GetResourceDriftRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetResourceDriftRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.GetResourceDriftRequest - * @instance - */ - GetResourceDriftRequest.prototype.name = ""; - - /** - * Creates a new GetResourceDriftRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.GetResourceDriftRequest - * @static - * @param {google.cloud.config.v1.IGetResourceDriftRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest instance - */ - GetResourceDriftRequest.create = function create(properties) { - return new GetResourceDriftRequest(properties); - }; - - /** - * Encodes the specified GetResourceDriftRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.GetResourceDriftRequest - * @static - * @param {google.cloud.config.v1.IGetResourceDriftRequest} message GetResourceDriftRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetResourceDriftRequest.encode = function encode(message, writer) { - 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 GetResourceDriftRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.GetResourceDriftRequest - * @static - * @param {google.cloud.config.v1.IGetResourceDriftRequest} message GetResourceDriftRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetResourceDriftRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetResourceDriftRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.GetResourceDriftRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetResourceDriftRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetResourceDriftRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetResourceDriftRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.GetResourceDriftRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetResourceDriftRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetResourceDriftRequest message. - * @function verify - * @memberof google.cloud.config.v1.GetResourceDriftRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetResourceDriftRequest.verify = function verify(message) { - if (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 GetResourceDriftRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.GetResourceDriftRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest - */ - GetResourceDriftRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.GetResourceDriftRequest) - return object; - var message = new $root.google.cloud.config.v1.GetResourceDriftRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetResourceDriftRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.GetResourceDriftRequest - * @static - * @param {google.cloud.config.v1.GetResourceDriftRequest} message GetResourceDriftRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetResourceDriftRequest.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 GetResourceDriftRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.GetResourceDriftRequest - * @instance - * @returns {Object.} JSON object - */ - GetResourceDriftRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetResourceDriftRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.GetResourceDriftRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetResourceDriftRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.GetResourceDriftRequest"; - }; - - return GetResourceDriftRequest; - })(); - - v1.ProviderConfig = (function() { - - /** - * Properties of a ProviderConfig. - * @memberof google.cloud.config.v1 - * @interface IProviderConfig - * @property {google.cloud.config.v1.ProviderConfig.ProviderSource|null} [sourceType] ProviderConfig sourceType - */ - - /** - * Constructs a new ProviderConfig. - * @memberof google.cloud.config.v1 - * @classdesc Represents a ProviderConfig. - * @implements IProviderConfig - * @constructor - * @param {google.cloud.config.v1.IProviderConfig=} [properties] Properties to set - */ - function ProviderConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProviderConfig sourceType. - * @member {google.cloud.config.v1.ProviderConfig.ProviderSource|null|undefined} sourceType - * @memberof google.cloud.config.v1.ProviderConfig - * @instance - */ - ProviderConfig.prototype.sourceType = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ProviderConfig.prototype, "_sourceType", { - get: $util.oneOfGetter($oneOfFields = ["sourceType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ProviderConfig instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.ProviderConfig - * @static - * @param {google.cloud.config.v1.IProviderConfig=} [properties] Properties to set - * @returns {google.cloud.config.v1.ProviderConfig} ProviderConfig instance - */ - ProviderConfig.create = function create(properties) { - return new ProviderConfig(properties); - }; - - /** - * Encodes the specified ProviderConfig message. Does not implicitly {@link google.cloud.config.v1.ProviderConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.ProviderConfig - * @static - * @param {google.cloud.config.v1.IProviderConfig} message ProviderConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProviderConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sourceType); - return writer; - }; - - /** - * Encodes the specified ProviderConfig message, length delimited. Does not implicitly {@link google.cloud.config.v1.ProviderConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.ProviderConfig - * @static - * @param {google.cloud.config.v1.IProviderConfig} message ProviderConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProviderConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProviderConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.ProviderConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.ProviderConfig} ProviderConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProviderConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ProviderConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.sourceType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProviderConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.ProviderConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.ProviderConfig} ProviderConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProviderConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProviderConfig message. - * @function verify - * @memberof google.cloud.config.v1.ProviderConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProviderConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) { - properties._sourceType = 1; - switch (message.sourceType) { - default: - return "sourceType: enum value expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ProviderConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.ProviderConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.ProviderConfig} ProviderConfig - */ - ProviderConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.ProviderConfig) - return object; - var message = new $root.google.cloud.config.v1.ProviderConfig(); - switch (object.sourceType) { - default: - if (typeof object.sourceType === "number") { - message.sourceType = object.sourceType; - break; - } - break; - case "PROVIDER_SOURCE_UNSPECIFIED": - case 0: - message.sourceType = 0; - break; - case "SERVICE_MAINTAINED": - case 1: - message.sourceType = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a ProviderConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.ProviderConfig - * @static - * @param {google.cloud.config.v1.ProviderConfig} message ProviderConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProviderConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) { - object.sourceType = options.enums === String ? $root.google.cloud.config.v1.ProviderConfig.ProviderSource[message.sourceType] === undefined ? message.sourceType : $root.google.cloud.config.v1.ProviderConfig.ProviderSource[message.sourceType] : message.sourceType; - if (options.oneofs) - object._sourceType = "sourceType"; - } - return object; - }; - - /** - * Converts this ProviderConfig to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.ProviderConfig - * @instance - * @returns {Object.} JSON object - */ - ProviderConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProviderConfig - * @function getTypeUrl - * @memberof google.cloud.config.v1.ProviderConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProviderConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.ProviderConfig"; - }; - - /** - * ProviderSource enum. - * @name google.cloud.config.v1.ProviderConfig.ProviderSource - * @enum {number} - * @property {number} PROVIDER_SOURCE_UNSPECIFIED=0 PROVIDER_SOURCE_UNSPECIFIED value - * @property {number} SERVICE_MAINTAINED=1 SERVICE_MAINTAINED value - */ - ProviderConfig.ProviderSource = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROVIDER_SOURCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SERVICE_MAINTAINED"] = 1; - return values; - })(); - - return ProviderConfig; - })(); - - v1.GetAutoMigrationConfigRequest = (function() { - - /** - * Properties of a GetAutoMigrationConfigRequest. - * @memberof google.cloud.config.v1 - * @interface IGetAutoMigrationConfigRequest - * @property {string|null} [name] GetAutoMigrationConfigRequest name - */ - - /** - * Constructs a new GetAutoMigrationConfigRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents a GetAutoMigrationConfigRequest. - * @implements IGetAutoMigrationConfigRequest - * @constructor - * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest=} [properties] Properties to set - */ - function GetAutoMigrationConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetAutoMigrationConfigRequest name. - * @member {string} name - * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest - * @instance - */ - GetAutoMigrationConfigRequest.prototype.name = ""; - - /** - * Creates a new GetAutoMigrationConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest - * @static - * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest instance - */ - GetAutoMigrationConfigRequest.create = function create(properties) { - return new GetAutoMigrationConfigRequest(properties); - }; - - /** - * Encodes the specified GetAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest - * @static - * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} message GetAutoMigrationConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAutoMigrationConfigRequest.encode = function encode(message, writer) { - 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 GetAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest - * @static - * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} message GetAutoMigrationConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAutoMigrationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAutoMigrationConfigRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetAutoMigrationConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAutoMigrationConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetAutoMigrationConfigRequest message. - * @function verify - * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetAutoMigrationConfigRequest.verify = function verify(message) { - if (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 GetAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest - */ - GetAutoMigrationConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.GetAutoMigrationConfigRequest) - return object; - var message = new $root.google.cloud.config.v1.GetAutoMigrationConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetAutoMigrationConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest - * @static - * @param {google.cloud.config.v1.GetAutoMigrationConfigRequest} message GetAutoMigrationConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetAutoMigrationConfigRequest.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 GetAutoMigrationConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest - * @instance - * @returns {Object.} JSON object - */ - GetAutoMigrationConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetAutoMigrationConfigRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetAutoMigrationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.GetAutoMigrationConfigRequest"; - }; - - return GetAutoMigrationConfigRequest; - })(); - - v1.AutoMigrationConfig = (function() { - - /** - * Properties of an AutoMigrationConfig. - * @memberof google.cloud.config.v1 - * @interface IAutoMigrationConfig - * @property {string|null} [name] AutoMigrationConfig name - * @property {google.protobuf.ITimestamp|null} [updateTime] AutoMigrationConfig updateTime - * @property {boolean|null} [autoMigrationEnabled] AutoMigrationConfig autoMigrationEnabled - */ - - /** - * Constructs a new AutoMigrationConfig. - * @memberof google.cloud.config.v1 - * @classdesc Represents an AutoMigrationConfig. - * @implements IAutoMigrationConfig - * @constructor - * @param {google.cloud.config.v1.IAutoMigrationConfig=} [properties] Properties to set - */ - function AutoMigrationConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutoMigrationConfig name. - * @member {string} name - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @instance - */ - AutoMigrationConfig.prototype.name = ""; - - /** - * AutoMigrationConfig updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @instance - */ - AutoMigrationConfig.prototype.updateTime = null; - - /** - * AutoMigrationConfig autoMigrationEnabled. - * @member {boolean} autoMigrationEnabled - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @instance - */ - AutoMigrationConfig.prototype.autoMigrationEnabled = false; - - /** - * Creates a new AutoMigrationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @static - * @param {google.cloud.config.v1.IAutoMigrationConfig=} [properties] Properties to set - * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig instance - */ - AutoMigrationConfig.create = function create(properties) { - return new AutoMigrationConfig(properties); - }; - - /** - * Encodes the specified AutoMigrationConfig message. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @static - * @param {google.cloud.config.v1.IAutoMigrationConfig} message AutoMigrationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoMigrationConfig.encode = function encode(message, writer) { - 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.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoMigrationEnabled != null && Object.hasOwnProperty.call(message, "autoMigrationEnabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.autoMigrationEnabled); - return writer; - }; - - /** - * Encodes the specified AutoMigrationConfig message, length delimited. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @static - * @param {google.cloud.config.v1.IAutoMigrationConfig} message AutoMigrationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoMigrationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutoMigrationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoMigrationConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.AutoMigrationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.autoMigrationEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutoMigrationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoMigrationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutoMigrationConfig message. - * @function verify - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutoMigrationConfig.verify = function verify(message) { - if (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.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.autoMigrationEnabled != null && message.hasOwnProperty("autoMigrationEnabled")) - if (typeof message.autoMigrationEnabled !== "boolean") - return "autoMigrationEnabled: boolean expected"; - return null; - }; - - /** - * Creates an AutoMigrationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig - */ - AutoMigrationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.AutoMigrationConfig) - return object; - var message = new $root.google.cloud.config.v1.AutoMigrationConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.config.v1.AutoMigrationConfig.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.autoMigrationEnabled != null) - message.autoMigrationEnabled = Boolean(object.autoMigrationEnabled); - return message; - }; - - /** - * Creates a plain object from an AutoMigrationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @static - * @param {google.cloud.config.v1.AutoMigrationConfig} message AutoMigrationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutoMigrationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.updateTime = null; - object.autoMigrationEnabled = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.autoMigrationEnabled != null && message.hasOwnProperty("autoMigrationEnabled")) - object.autoMigrationEnabled = message.autoMigrationEnabled; - return object; - }; - - /** - * Converts this AutoMigrationConfig to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @instance - * @returns {Object.} JSON object - */ - AutoMigrationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AutoMigrationConfig - * @function getTypeUrl - * @memberof google.cloud.config.v1.AutoMigrationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutoMigrationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.AutoMigrationConfig"; - }; - - return AutoMigrationConfig; - })(); - - v1.UpdateAutoMigrationConfigRequest = (function() { - - /** - * Properties of an UpdateAutoMigrationConfigRequest. - * @memberof google.cloud.config.v1 - * @interface IUpdateAutoMigrationConfigRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAutoMigrationConfigRequest updateMask - * @property {google.cloud.config.v1.IAutoMigrationConfig|null} [autoMigrationConfig] UpdateAutoMigrationConfigRequest autoMigrationConfig - */ - - /** - * Constructs a new UpdateAutoMigrationConfigRequest. - * @memberof google.cloud.config.v1 - * @classdesc Represents an UpdateAutoMigrationConfigRequest. - * @implements IUpdateAutoMigrationConfigRequest - * @constructor - * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest=} [properties] Properties to set - */ - function UpdateAutoMigrationConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateAutoMigrationConfigRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @instance - */ - UpdateAutoMigrationConfigRequest.prototype.updateMask = null; - - /** - * UpdateAutoMigrationConfigRequest autoMigrationConfig. - * @member {google.cloud.config.v1.IAutoMigrationConfig|null|undefined} autoMigrationConfig - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @instance - */ - UpdateAutoMigrationConfigRequest.prototype.autoMigrationConfig = null; - - /** - * Creates a new UpdateAutoMigrationConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @static - * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest=} [properties] Properties to set - * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest instance - */ - UpdateAutoMigrationConfigRequest.create = function create(properties) { - return new UpdateAutoMigrationConfigRequest(properties); - }; - - /** - * Encodes the specified UpdateAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @static - * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} message UpdateAutoMigrationConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAutoMigrationConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.autoMigrationConfig != null && Object.hasOwnProperty.call(message, "autoMigrationConfig")) - $root.google.cloud.config.v1.AutoMigrationConfig.encode(message.autoMigrationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @static - * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} message UpdateAutoMigrationConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAutoMigrationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAutoMigrationConfigRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.autoMigrationConfig = $root.google.cloud.config.v1.AutoMigrationConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAutoMigrationConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateAutoMigrationConfigRequest message. - * @function verify - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateAutoMigrationConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.autoMigrationConfig != null && message.hasOwnProperty("autoMigrationConfig")) { - var error = $root.google.cloud.config.v1.AutoMigrationConfig.verify(message.autoMigrationConfig); - if (error) - return "autoMigrationConfig." + error; - } - return null; - }; - - /** - * Creates an UpdateAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest - */ - UpdateAutoMigrationConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest) - return object; - var message = new $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.config.v1.UpdateAutoMigrationConfigRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.autoMigrationConfig != null) { - if (typeof object.autoMigrationConfig !== "object") - throw TypeError(".google.cloud.config.v1.UpdateAutoMigrationConfigRequest.autoMigrationConfig: object expected"); - message.autoMigrationConfig = $root.google.cloud.config.v1.AutoMigrationConfig.fromObject(object.autoMigrationConfig); - } - return message; - }; - - /** - * Creates a plain object from an UpdateAutoMigrationConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @static - * @param {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} message UpdateAutoMigrationConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateAutoMigrationConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.autoMigrationConfig = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.autoMigrationConfig != null && message.hasOwnProperty("autoMigrationConfig")) - object.autoMigrationConfig = $root.google.cloud.config.v1.AutoMigrationConfig.toObject(message.autoMigrationConfig, options); - return object; - }; - - /** - * Converts this UpdateAutoMigrationConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateAutoMigrationConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateAutoMigrationConfigRequest - * @function getTypeUrl - * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateAutoMigrationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.config.v1.UpdateAutoMigrationConfigRequest"; - }; - - return UpdateAutoMigrationConfigRequest; - })(); - - return v1; - })(); - - return config; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - 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.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - 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.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.FieldInfo = (function() { - - /** - * Properties of a FieldInfo. - * @memberof google.api - * @interface IFieldInfo - * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format - */ - - /** - * Constructs a new FieldInfo. - * @memberof google.api - * @classdesc Represents a FieldInfo. - * @implements IFieldInfo - * @constructor - * @param {google.api.IFieldInfo=} [properties] Properties to set - */ - function FieldInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldInfo format. - * @member {google.api.FieldInfo.Format} format - * @memberof google.api.FieldInfo - * @instance - */ - FieldInfo.prototype.format = 0; - - /** - * Creates a new FieldInfo instance using the specified properties. - * @function create - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo=} [properties] Properties to set - * @returns {google.api.FieldInfo} FieldInfo instance - */ - FieldInfo.create = function create(properties) { - return new FieldInfo(properties); - }; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encode - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - return writer; - }; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @function decode - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.format = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldInfo message. - * @function verify - * @memberof google.api.FieldInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.FieldInfo - * @static - * @param {Object.} object Plain object - * @returns {google.api.FieldInfo} FieldInfo - */ - FieldInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.FieldInfo) - return object; - var message = new $root.google.api.FieldInfo(); - switch (object.format) { - default: - if (typeof object.format === "number") { - message.format = object.format; - break; - } - break; - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "UUID4": - case 1: - message.format = 1; - break; - case "IPV4": - case 2: - message.format = 2; - break; - case "IPV6": - case 3: - message.format = 3; - break; - case "IPV4_OR_IPV6": - case 4: - message.format = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.FieldInfo - * @static - * @param {google.api.FieldInfo} message FieldInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; - return object; - }; - - /** - * Converts this FieldInfo to JSON. - * @function toJSON - * @memberof google.api.FieldInfo - * @instance - * @returns {Object.} JSON object - */ - FieldInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldInfo - * @function getTypeUrl - * @memberof google.api.FieldInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.FieldInfo"; - }; - - /** - * Format enum. - * @name google.api.FieldInfo.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} UUID4=1 UUID4 value - * @property {number} IPV4=2 IPV4 value - * @property {number} IPV6=3 IPV6 value - * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value - */ - FieldInfo.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "UUID4"] = 1; - values[valuesById[2] = "IPV4"] = 2; - values[valuesById[3] = "IPV6"] = 3; - values[valuesById[4] = "IPV4_OR_IPV6"] = 4; - return values; - })(); - - return FieldInfo; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - 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: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - 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]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * 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 - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - 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 - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * 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 = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 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); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - 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, error) { - 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(); - if (tag === error) - break; - 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; - } - case 14: { - message.edition = reader.int32(); - 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"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - 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); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - 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 = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - 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; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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() { - - /** - * 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * 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 = []; - this.declaration = []; - if (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; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * 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.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - 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, error) { - 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(); - if (tag === error) - break; - 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 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - 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; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - 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]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - 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.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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); - }; - - /** - * 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"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * 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 - * @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_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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} [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 {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.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.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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 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 50: { - message.features = $root.google.protobuf.FeatureSet.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; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - 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.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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - 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] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - 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.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * 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 - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.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; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * 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; - })(); - - 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} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - 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 unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = 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 debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldInfo"] = 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 FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - 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) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - 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(); - if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.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; - } - 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 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.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"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { - var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); - if (error) - return ".google.api.fieldInfo." + error; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - 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) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - 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.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.fieldInfo"] != null) { - if (typeof object[".google.api.fieldInfo"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - 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.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - object[".google.api.fieldInfo"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - 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] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) - object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * 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 - * @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; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @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 features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * 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.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.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; - } - } - 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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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 (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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); - }; - - /** - * 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; - })(); - - 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 {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @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 deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.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; - } - } - 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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); - }; - - /** - * 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; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @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 features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = 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.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = 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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: 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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - 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; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - 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); - }; - - /** - * 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; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @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 - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * 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 features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * 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"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - 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.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - 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; - } - case 525000001: { - message[".google.api.apiVersion"] = 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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: 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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - 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.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - 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); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.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; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - case 1049: { - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - 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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * 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 - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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 >= 0) - 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); - }; - - /** - * 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() { - - /** - * 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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() { - - /** - * 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 - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * 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; - - /** - * 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 - * @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); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - 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, error) { - 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(); - if (tag === error) - break; - 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; - } - case 5: { - message.semantic = 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"; - 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; - }; - - /** - * 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; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - 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; - }; - - /** - * 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; - object.semantic = options.enums === String ? "NONE" : 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; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * 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); - }; - - /** - * 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; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - - return Any; - })(); - - protobuf.Empty = (function() { - - /** - * 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - protobuf.Struct = (function() { - - /** - * Properties of a Struct. - * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields - */ - - /** - * Constructs a new Struct. - * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct - * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set - */ - function Struct(properties) { - this.fields = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyObject; - - /** - * Creates a new Struct instance using the specified properties. - * @function create - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance - */ - Struct.create = function create(properties) { - return new Struct(properties); - }; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Struct message. - * @function verify - * @memberof google.protobuf.Struct - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Struct.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Struct - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct - */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) - return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.Struct} message Struct - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Struct.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); - } - return object; - }; - - /** - * Converts this Struct to JSON. - * @function toJSON - * @memberof google.protobuf.Struct - * @instance - * @returns {Object.} JSON object - */ - Struct.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Struct - * @function getTypeUrl - * @memberof google.protobuf.Struct - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Struct"; - }; - - return Struct; - })(); - - protobuf.Value = (function() { - - /** - * Properties of a Value. - * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue - */ - - /** - * Constructs a new Value. - * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set - */ - function Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = null; - - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = null; - - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = null; - - /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = null; - - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; - - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.listValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.nullValue = reader.int32(); - break; - } - case 2: { - message.numberValue = reader.double(); - break; - } - case 3: { - message.stringValue = reader.string(); - break; - } - case 4: { - message.boolValue = reader.bool(); - break; - } - case 5: { - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 6: { - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Value message. - * @function verify - * @memberof google.protobuf.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } - } - return null; - }; - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) - return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - default: - if (typeof object.nullValue === "number") { - message.nullValue = object.nullValue; - break; - } - break; - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); - } - return message; - }; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; - } - return object; - }; - - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.protobuf.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Value - * @function getTypeUrl - * @memberof google.protobuf.Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Value"; - }; - - return Value; - })(); - - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {number} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; - })(); - - protobuf.ListValue = (function() { - - /** - * Properties of a ListValue. - * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values - */ - - /** - * Constructs a new ListValue. - * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue - * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set - */ - function ListValue(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue - * @instance - */ - ListValue.prototype.values = $util.emptyArray; - - /** - * Creates a new ListValue instance using the specified properties. - * @function create - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance - */ - ListValue.create = function create(properties) { - return new ListValue(properties); - }; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListValue message. - * @function verify - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } - return null; - }; - - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue - */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) - return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.ListValue} message ListValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); - } - return object; - }; - - /** - * Converts this ListValue to JSON. - * @function toJSON - * @memberof google.protobuf.ListValue - * @instance - * @returns {Object.} JSON object - */ - ListValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListValue - * @function getTypeUrl - * @memberof google.protobuf.ListValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ListValue"; - }; - - return ListValue; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - return protobuf; - })(); - - google.longrunning = (function() { - - /** - * Namespace longrunning. - * @memberof google - * @namespace - */ - var longrunning = {}; - - longrunning.Operations = (function() { - - /** - * Constructs a new Operations service. - * @memberof google.longrunning - * @classdesc Represents an Operations - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Operations(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - - /** - * Creates new Operations service using the specified rpc implementation. - * @function create - * @memberof google.longrunning.Operations - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. - */ - Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @memberof google.longrunning.Operations - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse - */ - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @memberof google.longrunning.Operations - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @memberof google.longrunning.Operations - * @typedef DeleteOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOperation" }); - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @memberof google.longrunning.Operations - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @memberof google.longrunning.Operations - * @typedef WaitOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "WaitOperation" }); - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Operations; - })(); - - longrunning.Operation = (function() { - - /** - * Properties of an Operation. - * @memberof google.longrunning - * @interface IOperation - * @property {string|null} [name] Operation name - * @property {google.protobuf.IAny|null} [metadata] Operation metadata - * @property {boolean|null} [done] Operation done - * @property {google.rpc.IStatus|null} [error] Operation error - * @property {google.protobuf.IAny|null} [response] Operation response - */ - - /** - * Constructs a new Operation. - * @memberof google.longrunning - * @classdesc Represents an Operation. - * @implements IOperation - * @constructor - * @param {google.longrunning.IOperation=} [properties] Properties to set - */ - function Operation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Operation name. - * @member {string} name - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.name = ""; - - /** - * Operation metadata. - * @member {google.protobuf.IAny|null|undefined} metadata - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.metadata = null; - - /** - * Operation done. - * @member {boolean} done - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.done = false; - - /** - * Operation error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.error = null; - - /** - * Operation response. - * @member {google.protobuf.IAny|null|undefined} response - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.response = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Operation result. - * @member {"error"|"response"|undefined} result - * @memberof google.longrunning.Operation - * @instance - */ - Object.defineProperty(Operation.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["error", "response"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Operation instance using the specified properties. - * @function create - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation=} [properties] Properties to set - * @returns {google.longrunning.Operation} Operation instance - */ - Operation.create = function create(properties) { - return new Operation(properties); - }; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encode - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.done != null && Object.hasOwnProperty.call(message, "done")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - case 3: { - message.done = reader.bool(); - break; - } - case 4: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Operation message. - * @function verify - * @memberof google.longrunning.Operation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Operation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Any.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.done != null && message.hasOwnProperty("done")) - if (typeof message.done !== "boolean") - return "done: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) { - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - if (message.response != null && message.hasOwnProperty("response")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.protobuf.Any.verify(message.response); - if (error) - return "response." + error; - } - } - return null; - }; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.Operation - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.Operation} Operation - */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.Operation) - return object; - var message = new $root.google.longrunning.Operation(); - if (object.name != null) - message.name = String(object.name); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.longrunning.Operation.metadata: object expected"); - message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); - } - if (object.done != null) - message.done = Boolean(object.done); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.longrunning.Operation.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.response != null) { - if (typeof object.response !== "object") - throw TypeError(".google.longrunning.Operation.response: object expected"); - message.response = $root.google.protobuf.Any.fromObject(object.response); - } - return message; - }; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.Operation} message Operation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Operation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.metadata = null; - object.done = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); - if (message.done != null && message.hasOwnProperty("done")) - object.done = message.done; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } - if (message.response != null && message.hasOwnProperty("response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options); - if (options.oneofs) - object.result = "response"; - } - return object; - }; - - /** - * Converts this Operation to JSON. - * @function toJSON - * @memberof google.longrunning.Operation - * @instance - * @returns {Object.} JSON object - */ - Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Operation - * @function getTypeUrl - * @memberof google.longrunning.Operation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.Operation"; - }; - - return Operation; - })(); - - longrunning.GetOperationRequest = (function() { - - /** - * Properties of a GetOperationRequest. - * @memberof google.longrunning - * @interface IGetOperationRequest - * @property {string|null} [name] GetOperationRequest name - */ - - /** - * Constructs a new GetOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest - * @constructor - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - */ - function GetOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOperationRequest name. - * @member {string} name - * @memberof google.longrunning.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.name = ""; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance - */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); - }; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOperationRequest message. - * @function verify - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.GetOperationRequest) - return object; - var message = new $root.google.longrunning.GetOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.GetOperationRequest - * @instance - * @returns {Object.} JSON object - */ - GetOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; - }; - - return GetOperationRequest; - })(); - - longrunning.ListOperationsRequest = (function() { - - /** - * Properties of a ListOperationsRequest. - * @memberof google.longrunning - * @interface IListOperationsRequest - * @property {string|null} [name] ListOperationsRequest name - * @property {string|null} [filter] ListOperationsRequest filter - * @property {number|null} [pageSize] ListOperationsRequest pageSize - * @property {string|null} [pageToken] ListOperationsRequest pageToken - */ - - /** - * Constructs a new ListOperationsRequest. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest - * @constructor - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - */ - function ListOperationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsRequest name. - * @member {string} name - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.name = ""; - - /** - * ListOperationsRequest filter. - * @member {string} filter - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.filter = ""; - - /** - * ListOperationsRequest pageSize. - * @member {number} pageSize - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageSize = 0; - - /** - * ListOperationsRequest pageToken. - * @member {string} pageToken - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance - */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); - }; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 4: { - message.name = reader.string(); - break; - } - case 1: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsRequest message. - * @function verify - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsRequest) - return object; - var message = new $root.google.longrunning.ListOperationsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this ListOperationsRequest to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOperationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsRequest - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; - }; - - return ListOperationsRequest; - })(); - - longrunning.ListOperationsResponse = (function() { - - /** - * Properties of a ListOperationsResponse. - * @memberof google.longrunning - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken - */ - - /** - * Constructs a new ListOperationsResponse. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse - * @constructor - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - */ - function ListOperationsResponse(properties) { - this.operations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsResponse message. - * @function verify - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.longrunning.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsResponse) - return object; - var message = new $root.google.longrunning.ListOperationsResponse(); - if (object.operations) { - if (!Array.isArray(object.operations)) - throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); - message.operations = []; - for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.operations = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListOperationsResponse to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOperationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsResponse - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; - }; - - return ListOperationsResponse; - })(); - - longrunning.CancelOperationRequest = (function() { - - /** - * Properties of a CancelOperationRequest. - * @memberof google.longrunning - * @interface ICancelOperationRequest - * @property {string|null} [name] CancelOperationRequest name - */ - - /** - * Constructs a new CancelOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest - * @constructor - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - */ - function CancelOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.longrunning.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.name = ""; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance - */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); - }; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelOperationRequest message. - * @function verify - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.CancelOperationRequest) - return object; - var message = new $root.google.longrunning.CancelOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; - }; - - return CancelOperationRequest; - })(); - - longrunning.DeleteOperationRequest = (function() { - - /** - * Properties of a DeleteOperationRequest. - * @memberof google.longrunning - * @interface IDeleteOperationRequest - * @property {string|null} [name] DeleteOperationRequest name - */ - - /** - * Constructs a new DeleteOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a DeleteOperationRequest. - * @implements IDeleteOperationRequest - * @constructor - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - */ - function DeleteOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteOperationRequest name. - * @member {string} name - * @memberof google.longrunning.DeleteOperationRequest - * @instance - */ - DeleteOperationRequest.prototype.name = ""; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance - */ - DeleteOperationRequest.create = function create(properties) { - return new DeleteOperationRequest(properties); - }; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteOperationRequest message. - * @function verify - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - */ - DeleteOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.DeleteOperationRequest) - return object; - var message = new $root.google.longrunning.DeleteOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.DeleteOperationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; - }; - - return DeleteOperationRequest; - })(); - - longrunning.WaitOperationRequest = (function() { - - /** - * Properties of a WaitOperationRequest. - * @memberof google.longrunning - * @interface IWaitOperationRequest - * @property {string|null} [name] WaitOperationRequest name - * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout - */ - - /** - * Constructs a new WaitOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a WaitOperationRequest. - * @implements IWaitOperationRequest - * @constructor - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - */ - function WaitOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WaitOperationRequest name. - * @member {string} name - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.name = ""; - - /** - * WaitOperationRequest timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.timeout = null; - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance - */ - WaitOperationRequest.create = function create(properties) { - return new WaitOperationRequest(properties); - }; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WaitOperationRequest message. - * @function verify - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WaitOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - return null; - }; - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - */ - WaitOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.WaitOperationRequest) - return object; - var message = new $root.google.longrunning.WaitOperationRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); - } - return message; - }; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WaitOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.timeout = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - return object; - }; - - /** - * Converts this WaitOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.WaitOperationRequest - * @instance - * @returns {Object.} JSON object - */ - WaitOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WaitOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; - }; - - return WaitOperationRequest; - })(); - - longrunning.OperationInfo = (function() { - - /** - * Properties of an OperationInfo. - * @memberof google.longrunning - * @interface IOperationInfo - * @property {string|null} [responseType] OperationInfo responseType - * @property {string|null} [metadataType] OperationInfo metadataType - */ - - /** - * Constructs a new OperationInfo. - * @memberof google.longrunning - * @classdesc Represents an OperationInfo. - * @implements IOperationInfo - * @constructor - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - */ - function OperationInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationInfo responseType. - * @member {string} responseType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.responseType = ""; - - /** - * OperationInfo metadataType. - * @member {string} metadataType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.metadataType = ""; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @function create - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - * @returns {google.longrunning.OperationInfo} OperationInfo instance - */ - OperationInfo.create = function create(properties) { - return new OperationInfo(properties); - }; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encode - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); - return writer; - }; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.responseType = reader.string(); - break; - } - case 2: { - message.metadataType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationInfo message. - * @function verify - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.responseType != null && message.hasOwnProperty("responseType")) - if (!$util.isString(message.responseType)) - return "responseType: string expected"; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - if (!$util.isString(message.metadataType)) - return "metadataType: string expected"; - return null; - }; - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.OperationInfo} OperationInfo - */ - OperationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.OperationInfo) - return object; - var message = new $root.google.longrunning.OperationInfo(); - if (object.responseType != null) - message.responseType = String(object.responseType); - if (object.metadataType != null) - message.metadataType = String(object.metadataType); - return message; - }; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.OperationInfo} message OperationInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.responseType = ""; - object.metadataType = ""; - } - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - object.metadataType = message.metadataType; - return object; - }; - - /** - * Converts this OperationInfo to JSON. - * @function toJSON - * @memberof google.longrunning.OperationInfo - * @instance - * @returns {Object.} JSON object - */ - OperationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationInfo - * @function getTypeUrl - * @memberof google.longrunning.OperationInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.OperationInfo"; - }; - - return OperationInfo; - })(); - - return longrunning; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-config/protos/protos.json b/owl-bot-staging/google-cloud-config/protos/protos.json deleted file mode 100644 index e5bbde9c1d5..00000000000 --- a/owl-bot-staging/google-cloud-config/protos/protos.json +++ /dev/null @@ -1,5103 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "config": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.Config.V1", - "go_package": "cloud.google.com/go/config/apiv1/configpb;configpb", - "java_multiple_files": true, - "java_outer_classname": "ConfigProto", - "java_package": "com.google.cloud.config.v1", - "php_namespace": "Google\\Cloud\\Config\\V1", - "ruby_package": "Google::Cloud::ConfigService::V1", - "(google.api.resource_definition).type": "cloudbuild.googleapis.com/WorkerPool", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/workerPools/{worker_pool}" - }, - "nested": { - "Config": { - "options": { - "(google.api.default_host)": "config.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListDeployments": { - "requestType": "ListDeploymentsRequest", - "responseType": "ListDeploymentsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/deployments", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/deployments" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetDeployment": { - "requestType": "GetDeploymentRequest", - "responseType": "Deployment", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/deployments/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/deployments/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateDeployment": { - "requestType": "CreateDeploymentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/deployments", - "(google.api.http).body": "deployment", - "(google.api.method_signature)": "parent,deployment,deployment_id", - "(google.longrunning.operation_info).response_type": "Deployment", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/deployments", - "body": "deployment" - } - }, - { - "(google.api.method_signature)": "parent,deployment,deployment_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Deployment", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateDeployment": { - "requestType": "UpdateDeploymentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{deployment.name=projects/*/locations/*/deployments/*}", - "(google.api.http).body": "deployment", - "(google.api.method_signature)": "deployment,update_mask", - "(google.longrunning.operation_info).response_type": "Deployment", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{deployment.name=projects/*/locations/*/deployments/*}", - "body": "deployment" - } - }, - { - "(google.api.method_signature)": "deployment,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Deployment", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteDeployment": { - "requestType": "DeleteDeploymentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/deployments/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "Deployment", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/deployments/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Deployment", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListRevisions": { - "requestType": "ListRevisionsRequest", - "responseType": "ListRevisionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/deployments/*}/revisions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/deployments/*}/revisions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetRevision": { - "requestType": "GetRevisionRequest", - "responseType": "Revision", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/deployments/*/revisions/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/deployments/*/revisions/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetResource": { - "requestType": "GetResourceRequest", - "responseType": "Resource", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListResources": { - "requestType": "ListResourcesRequest", - "responseType": "ListResourcesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "ExportDeploymentStatefile": { - "requestType": "ExportDeploymentStatefileRequest", - "responseType": "Statefile", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/deployments/*}:exportState", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/deployments/*}:exportState", - "body": "*" - } - } - ] - }, - "ExportRevisionStatefile": { - "requestType": "ExportRevisionStatefileRequest", - "responseType": "Statefile", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState", - "body": "*" - } - } - ] - }, - "ImportStatefile": { - "requestType": "ImportStatefileRequest", - "responseType": "Statefile", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/deployments/*}:importState", - "(google.api.http).body": "*", - "(google.api.method_signature)": "parent,lock_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/deployments/*}:importState", - "body": "*" - } - }, - { - "(google.api.method_signature)": "parent,lock_id" - } - ] - }, - "DeleteStatefile": { - "requestType": "DeleteStatefileRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/deployments/*}:deleteState", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/deployments/*}:deleteState", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "LockDeployment": { - "requestType": "LockDeploymentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/deployments/*}:lock", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "Deployment", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/deployments/*}:lock", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Deployment", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UnlockDeployment": { - "requestType": "UnlockDeploymentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/deployments/*}:unlock", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,lock_id", - "(google.longrunning.operation_info).response_type": "Deployment", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/deployments/*}:unlock", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name,lock_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Deployment", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ExportLockInfo": { - "requestType": "ExportLockInfoRequest", - "responseType": "LockInfo", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/deployments/*}:exportLock", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/deployments/*}:exportLock" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreatePreview": { - "requestType": "CreatePreviewRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/previews", - "(google.api.http).body": "preview", - "(google.api.method_signature)": "parent,preview", - "(google.longrunning.operation_info).response_type": "Preview", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/previews", - "body": "preview" - } - }, - { - "(google.api.method_signature)": "parent,preview" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Preview", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetPreview": { - "requestType": "GetPreviewRequest", - "responseType": "Preview", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/previews/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/previews/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListPreviews": { - "requestType": "ListPreviewsRequest", - "responseType": "ListPreviewsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/previews", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/previews" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeletePreview": { - "requestType": "DeletePreviewRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/previews/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "Preview", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/previews/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Preview", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ExportPreviewResult": { - "requestType": "ExportPreviewResultRequest", - "responseType": "ExportPreviewResultResponse", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/previews/*}:export", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/previews/*}:export", - "body": "*" - } - } - ] - }, - "ListTerraformVersions": { - "requestType": "ListTerraformVersionsRequest", - "responseType": "ListTerraformVersionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/terraformVersions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/terraformVersions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetTerraformVersion": { - "requestType": "GetTerraformVersionRequest", - "responseType": "TerraformVersion", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/terraformVersions/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/terraformVersions/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListResourceChanges": { - "requestType": "ListResourceChangesRequest", - "responseType": "ListResourceChangesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceChanges", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceChanges" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetResourceChange": { - "requestType": "GetResourceChangeRequest", - "responseType": "ResourceChange", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/previews/*/resourceChanges/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/previews/*/resourceChanges/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListResourceDrifts": { - "requestType": "ListResourceDriftsRequest", - "responseType": "ListResourceDriftsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceDrifts", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceDrifts" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetResourceDrift": { - "requestType": "GetResourceDriftRequest", - "responseType": "ResourceDrift", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/previews/*/resourceDrifts/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/previews/*/resourceDrifts/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetAutoMigrationConfig": { - "requestType": "GetAutoMigrationConfigRequest", - "responseType": "AutoMigrationConfig", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/autoMigrationConfig}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/autoMigrationConfig}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateAutoMigrationConfig": { - "requestType": "UpdateAutoMigrationConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{auto_migration_config.name=projects/*/locations/*/autoMigrationConfig}", - "(google.api.http).body": "auto_migration_config", - "(google.api.method_signature)": "auto_migration_config,update_mask", - "(google.longrunning.operation_info).response_type": "AutoMigrationConfig", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{auto_migration_config.name=projects/*/locations/*/autoMigrationConfig}", - "body": "auto_migration_config" - } - }, - { - "(google.api.method_signature)": "auto_migration_config,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "AutoMigrationConfig", - "metadata_type": "OperationMetadata" - } - } - ] - } - } - }, - "QuotaValidation": { - "values": { - "QUOTA_VALIDATION_UNSPECIFIED": 0, - "ENABLED": 1, - "ENFORCED": 2 - } - }, - "Deployment": { - "options": { - "(google.api.resource).type": "config.googleapis.com/Deployment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/deployments/{deployment}" - }, - "oneofs": { - "blueprint": { - "oneof": [ - "terraformBlueprint" - ] - }, - "_artifactsGcsBucket": { - "oneof": [ - "artifactsGcsBucket" - ] - }, - "_serviceAccount": { - "oneof": [ - "serviceAccount" - ] - }, - "_importExistingResources": { - "oneof": [ - "importExistingResources" - ] - }, - "_workerPool": { - "oneof": [ - "workerPool" - ] - }, - "_tfVersionConstraint": { - "oneof": [ - "tfVersionConstraint" - ] - } - }, - "fields": { - "terraformBlueprint": { - "type": "TerraformBlueprint", - "id": 6 - }, - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "state": { - "type": "State", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "latestRevision": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "stateDetail": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "errorCode": { - "type": "ErrorCode", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "deleteResults": { - "type": "ApplyResults", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "deleteBuild": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "deleteLogs": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "tfErrors": { - "rule": "repeated", - "type": "TerraformError", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "errorLogs": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "artifactsGcsBucket": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "serviceAccount": { - "type": "string", - "id": 16, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount", - "proto3_optional": true - } - }, - "importExistingResources": { - "type": "bool", - "id": 17, - "options": { - "proto3_optional": true - } - }, - "workerPool": { - "type": "string", - "id": 19, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool", - "proto3_optional": true - } - }, - "lockState": { - "type": "LockState", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "tfVersionConstraint": { - "type": "string", - "id": 21, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "tfVersion": { - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "quotaValidation": { - "type": "QuotaValidation", - "id": 23, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "annotations": { - "keyType": "string", - "type": "string", - "id": 24, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "providerConfig": { - "type": "ProviderConfig", - "id": 25, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "UPDATING": 3, - "DELETING": 4, - "FAILED": 5, - "SUSPENDED": 6, - "DELETED": 7 - } - }, - "ErrorCode": { - "values": { - "ERROR_CODE_UNSPECIFIED": 0, - "REVISION_FAILED": 1, - "CLOUD_BUILD_PERMISSION_DENIED": 3, - "DELETE_BUILD_API_FAILED": 5, - "DELETE_BUILD_RUN_FAILED": 6, - "BUCKET_CREATION_PERMISSION_DENIED": 7, - "BUCKET_CREATION_FAILED": 8, - "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": 10 - } - }, - "LockState": { - "values": { - "LOCK_STATE_UNSPECIFIED": 0, - "LOCKED": 1, - "UNLOCKED": 2, - "LOCKING": 3, - "UNLOCKING": 4, - "LOCK_FAILED": 5, - "UNLOCK_FAILED": 6 - } - } - } - }, - "TerraformBlueprint": { - "oneofs": { - "source": { - "oneof": [ - "gcsSource", - "gitSource" - ] - } - }, - "fields": { - "gcsSource": { - "type": "string", - "id": 1 - }, - "gitSource": { - "type": "GitSource", - "id": 2 - }, - "inputValues": { - "keyType": "string", - "type": "TerraformVariable", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TerraformVariable": { - "fields": { - "inputValue": { - "type": "google.protobuf.Value", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ApplyResults": { - "fields": { - "content": { - "type": "string", - "id": 1 - }, - "artifacts": { - "type": "string", - "id": 2 - }, - "outputs": { - "keyType": "string", - "type": "TerraformOutput", - "id": 3 - } - } - }, - "TerraformOutput": { - "fields": { - "sensitive": { - "type": "bool", - "id": 1 - }, - "value": { - "type": "google.protobuf.Value", - "id": 2 - } - } - }, - "ListDeploymentsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListDeploymentsResponse": { - "fields": { - "deployments": { - "rule": "repeated", - "type": "Deployment", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetDeploymentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Deployment" - } - } - } - }, - "ListRevisionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Deployment" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListRevisionsResponse": { - "fields": { - "revisions": { - "rule": "repeated", - "type": "Revision", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetRevisionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Revision" - } - } - } - }, - "CreateDeploymentRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "deploymentId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "deployment": { - "type": "Deployment", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateDeploymentRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "deployment": { - "type": "Deployment", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteDeploymentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Deployment" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "deletePolicy": { - "type": "DeletePolicy", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "DeletePolicy": { - "values": { - "DELETE_POLICY_UNSPECIFIED": 0, - "DELETE": 1, - "ABANDON": 2 - } - } - } - }, - "OperationMetadata": { - "oneofs": { - "resourceMetadata": { - "oneof": [ - "deploymentMetadata", - "previewMetadata" - ] - } - }, - "fields": { - "deploymentMetadata": { - "type": "DeploymentOperationMetadata", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "previewMetadata": { - "type": "PreviewOperationMetadata", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "target": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "verb": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "requestedCancellation": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "apiVersion": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Revision": { - "options": { - "(google.api.resource).type": "config.googleapis.com/Revision", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}" - }, - "oneofs": { - "blueprint": { - "oneof": [ - "terraformBlueprint" - ] - } - }, - "fields": { - "terraformBlueprint": { - "type": "TerraformBlueprint", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "name": { - "type": "string", - "id": 1 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "action": { - "type": "Action", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "applyResults": { - "type": "ApplyResults", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "stateDetail": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "errorCode": { - "type": "ErrorCode", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "build": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "logs": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "tfErrors": { - "rule": "repeated", - "type": "TerraformError", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "errorLogs": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "serviceAccount": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" - } - }, - "importExistingResources": { - "type": "bool", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "workerPool": { - "type": "string", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool" - } - }, - "tfVersionConstraint": { - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "tfVersion": { - "type": "string", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "quotaValidationResults": { - "type": "string", - "id": 29, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "quotaValidation": { - "type": "QuotaValidation", - "id": 20, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "providerConfig": { - "type": "ProviderConfig", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "CREATE": 1, - "UPDATE": 2, - "DELETE": 3 - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "APPLYING": 1, - "APPLIED": 2, - "FAILED": 3 - } - }, - "ErrorCode": { - "values": { - "ERROR_CODE_UNSPECIFIED": 0, - "CLOUD_BUILD_PERMISSION_DENIED": 1, - "APPLY_BUILD_API_FAILED": 4, - "APPLY_BUILD_RUN_FAILED": 5, - "QUOTA_VALIDATION_FAILED": 7, - "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": 8 - } - } - } - }, - "TerraformError": { - "fields": { - "resourceAddress": { - "type": "string", - "id": 1 - }, - "httpResponseCode": { - "type": "int32", - "id": 2 - }, - "errorDescription": { - "type": "string", - "id": 3 - }, - "error": { - "type": "google.rpc.Status", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "GitSource": { - "oneofs": { - "_repo": { - "oneof": [ - "repo" - ] - }, - "_directory": { - "oneof": [ - "directory" - ] - }, - "_ref": { - "oneof": [ - "ref" - ] - } - }, - "fields": { - "repo": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "directory": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "ref": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "DeploymentOperationMetadata": { - "fields": { - "step": { - "type": "DeploymentStep", - "id": 1 - }, - "applyResults": { - "type": "ApplyResults", - "id": 2 - }, - "build": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "logs": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "DeploymentStep": { - "values": { - "DEPLOYMENT_STEP_UNSPECIFIED": 0, - "PREPARING_STORAGE_BUCKET": 1, - "DOWNLOADING_BLUEPRINT": 2, - "RUNNING_TF_INIT": 3, - "RUNNING_TF_PLAN": 4, - "RUNNING_TF_APPLY": 5, - "RUNNING_TF_DESTROY": 6, - "RUNNING_TF_VALIDATE": 7, - "UNLOCKING_DEPLOYMENT": 8, - "SUCCEEDED": 9, - "FAILED": 10, - "VALIDATING_REPOSITORY": 11, - "RUNNING_QUOTA_VALIDATION": 12 - } - } - } - }, - "Resource": { - "options": { - "(google.api.resource).type": "config.googleapis.com/Resource", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "terraformInfo": { - "type": "ResourceTerraformInfo", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "caiAssets": { - "keyType": "string", - "type": "ResourceCAIInfo", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "intent": { - "type": "Intent", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Intent": { - "values": { - "INTENT_UNSPECIFIED": 0, - "CREATE": 1, - "UPDATE": 2, - "DELETE": 3, - "RECREATE": 4, - "UNCHANGED": 5 - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "PLANNED": 1, - "IN_PROGRESS": 2, - "RECONCILED": 3, - "FAILED": 4 - } - } - } - }, - "ResourceTerraformInfo": { - "fields": { - "address": { - "type": "string", - "id": 1 - }, - "type": { - "type": "string", - "id": 2 - }, - "id": { - "type": "string", - "id": 3 - } - } - }, - "ResourceCAIInfo": { - "fields": { - "fullResourceName": { - "type": "string", - "id": 1 - } - } - }, - "GetResourceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Resource" - } - } - } - }, - "ListResourcesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Revision" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListResourcesResponse": { - "fields": { - "resources": { - "rule": "repeated", - "type": "Resource", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "Statefile": { - "fields": { - "signedUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ExportDeploymentStatefileRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Deployment" - } - }, - "draft": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ExportRevisionStatefileRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Revision" - } - } - } - }, - "ImportStatefileRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Deployment" - } - }, - "lockId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "skipDraft": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteStatefileRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Deployment" - } - }, - "lockId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "LockDeploymentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Deployment" - } - } - } - }, - "UnlockDeploymentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Deployment" - } - }, - "lockId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ExportLockInfoRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Deployment" - } - } - } - }, - "LockInfo": { - "fields": { - "lockId": { - "type": "int64", - "id": 1 - }, - "operation": { - "type": "string", - "id": 2 - }, - "info": { - "type": "string", - "id": 3 - }, - "who": { - "type": "string", - "id": 4 - }, - "version": { - "type": "string", - "id": 5 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - } - } - }, - "Preview": { - "options": { - "(google.api.resource).type": "config.googleapis.com/Preview", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/previews/{preview}", - "(google.api.resource).plural": "previews", - "(google.api.resource).singular": "preview" - }, - "oneofs": { - "blueprint": { - "oneof": [ - "terraformBlueprint" - ] - }, - "_artifactsGcsBucket": { - "oneof": [ - "artifactsGcsBucket" - ] - }, - "_workerPool": { - "oneof": [ - "workerPool" - ] - }, - "_tfVersionConstraint": { - "oneof": [ - "tfVersionConstraint" - ] - } - }, - "fields": { - "terraformBlueprint": { - "type": "TerraformBlueprint", - "id": 6 - }, - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "state": { - "type": "State", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "deployment": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "config.googleapis.com/Deployment" - } - }, - "previewMode": { - "type": "PreviewMode", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "serviceAccount": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" - } - }, - "artifactsGcsBucket": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "workerPool": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool", - "proto3_optional": true - } - }, - "errorCode": { - "type": "ErrorCode", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "errorStatus": { - "type": "google.rpc.Status", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "build": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "tfErrors": { - "rule": "repeated", - "type": "TerraformError", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "errorLogs": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "previewArtifacts": { - "type": "PreviewArtifacts", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "logs": { - "type": "string", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "tfVersion": { - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "tfVersionConstraint": { - "type": "string", - "id": 19, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "annotations": { - "keyType": "string", - "type": "string", - "id": 20, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "providerConfig": { - "type": "ProviderConfig", - "id": 21, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "SUCCEEDED": 2, - "APPLYING": 3, - "STALE": 4, - "DELETING": 5, - "FAILED": 6, - "DELETED": 7 - } - }, - "PreviewMode": { - "values": { - "PREVIEW_MODE_UNSPECIFIED": 0, - "DEFAULT": 1, - "DELETE": 2 - } - }, - "ErrorCode": { - "values": { - "ERROR_CODE_UNSPECIFIED": 0, - "CLOUD_BUILD_PERMISSION_DENIED": 1, - "BUCKET_CREATION_PERMISSION_DENIED": 2, - "BUCKET_CREATION_FAILED": 3, - "DEPLOYMENT_LOCK_ACQUIRE_FAILED": 4, - "PREVIEW_BUILD_API_FAILED": 5, - "PREVIEW_BUILD_RUN_FAILED": 6, - "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": 7 - } - } - } - }, - "PreviewOperationMetadata": { - "fields": { - "step": { - "type": "PreviewStep", - "id": 1 - }, - "previewArtifacts": { - "type": "PreviewArtifacts", - "id": 2 - }, - "logs": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "build": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "PreviewStep": { - "values": { - "PREVIEW_STEP_UNSPECIFIED": 0, - "PREPARING_STORAGE_BUCKET": 1, - "DOWNLOADING_BLUEPRINT": 2, - "RUNNING_TF_INIT": 3, - "RUNNING_TF_PLAN": 4, - "FETCHING_DEPLOYMENT": 5, - "LOCKING_DEPLOYMENT": 6, - "UNLOCKING_DEPLOYMENT": 7, - "SUCCEEDED": 8, - "FAILED": 9, - "VALIDATING_REPOSITORY": 10 - } - } - } - }, - "PreviewArtifacts": { - "fields": { - "content": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "artifacts": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CreatePreviewRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "previewId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "preview": { - "type": "Preview", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetPreviewRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Preview" - } - } - } - }, - "ListPreviewsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListPreviewsResponse": { - "fields": { - "previews": { - "rule": "repeated", - "type": "Preview", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "DeletePreviewRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Preview" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ExportPreviewResultRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Preview" - } - } - } - }, - "ExportPreviewResultResponse": { - "fields": { - "result": { - "type": "PreviewResult", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "PreviewResult": { - "fields": { - "binarySignedUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "jsonSignedUri": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "GetTerraformVersionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/TerraformVersion" - } - } - } - }, - "ListTerraformVersionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListTerraformVersionsResponse": { - "fields": { - "terraformVersions": { - "rule": "repeated", - "type": "TerraformVersion", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "TerraformVersion": { - "options": { - "(google.api.resource).type": "config.googleapis.com/TerraformVersion", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/terraformVersions/{terraform_version}", - "(google.api.resource).plural": "terraformVersions", - "(google.api.resource).singular": "terraformVersion" - }, - "oneofs": { - "_deprecateTime": { - "oneof": [ - "deprecateTime" - ] - }, - "_obsoleteTime": { - "oneof": [ - "obsoleteTime" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "state": { - "type": "State", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "supportTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "deprecateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "obsoleteTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "DEPRECATED": 2, - "OBSOLETE": 3 - } - } - } - }, - "ResourceChangeTerraformInfo": { - "fields": { - "address": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "type": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "provider": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "actions": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ResourceChange": { - "options": { - "(google.api.resource).type": "config.googleapis.com/ResourceChange", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}", - "(google.api.resource).plural": "resourceChanges", - "(google.api.resource).singular": "resourceChange" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "terraformInfo": { - "type": "ResourceChangeTerraformInfo", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "intent": { - "type": "Intent", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "propertyChanges": { - "rule": "repeated", - "type": "PropertyChange", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Intent": { - "values": { - "INTENT_UNSPECIFIED": 0, - "CREATE": 1, - "UPDATE": 2, - "DELETE": 3, - "RECREATE": 4, - "UNCHANGED": 5 - } - } - } - }, - "PropertyChange": { - "fields": { - "path": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "beforeSensitivePaths": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "before": { - "type": "google.protobuf.Value", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "afterSensitivePaths": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "after": { - "type": "google.protobuf.Value", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ListResourceChangesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Preview" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListResourceChangesResponse": { - "fields": { - "resourceChanges": { - "rule": "repeated", - "type": "ResourceChange", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetResourceChangeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/ResourceChange" - } - } - } - }, - "ResourceDriftTerraformInfo": { - "fields": { - "address": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "type": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "provider": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ResourceDrift": { - "options": { - "(google.api.resource).type": "config.googleapis.com/ResourceDrift", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}", - "(google.api.resource).plural": "resourceDrifts", - "(google.api.resource).singular": "resourceDrift" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "terraformInfo": { - "type": "ResourceDriftTerraformInfo", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "propertyDrifts": { - "rule": "repeated", - "type": "PropertyDrift", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "PropertyDrift": { - "fields": { - "path": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "beforeSensitivePaths": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "before": { - "type": "google.protobuf.Value", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "afterSensitivePaths": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "after": { - "type": "google.protobuf.Value", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ListResourceDriftsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Preview" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListResourceDriftsResponse": { - "fields": { - "resourceDrifts": { - "rule": "repeated", - "type": "ResourceDrift", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetResourceDriftRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/ResourceDrift" - } - } - } - }, - "ProviderConfig": { - "oneofs": { - "_sourceType": { - "oneof": [ - "sourceType" - ] - } - }, - "fields": { - "sourceType": { - "type": "ProviderSource", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "ProviderSource": { - "values": { - "PROVIDER_SOURCE_UNSPECIFIED": 0, - "SERVICE_MAINTAINED": 1 - } - } - } - }, - "GetAutoMigrationConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/AutoMigrationConfig" - } - } - } - }, - "AutoMigrationConfig": { - "options": { - "(google.api.resource).type": "config.googleapis.com/AutoMigrationConfig", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/autoMigrationConfig", - "(google.api.resource).plural": "autoMigrationConfigs", - "(google.api.resource).singular": "autoMigrationConfig" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "autoMigrationEnabled": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateAutoMigrationConfigRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "autoMigrationConfig": { - "type": "AutoMigrationConfig", - "id": 2, - "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": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "fieldInfo": { - "type": "google.api.FieldInfo", - "id": 291403980, - "extend": "google.protobuf.FieldOptions" - }, - "FieldInfo": { - "fields": { - "format": { - "type": "Format", - "id": 1 - } - }, - "nested": { - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "UUID4": 1, - "IPV4": 2, - "IPV6": 3, - "IPV4_OR_IPV6": 4 - } - } - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "edition": "proto2", - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "edition": "proto2", - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "edition": "proto2", - "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 - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11 - }, - "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 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "edition": "proto2", - "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": { - "edition": "proto2", - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "edition": "proto2", - "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_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "edition": "proto2", - "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": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "edition": "proto2", - "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": { - "edition": "proto2", - "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 - } - }, - "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 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "edition": "proto2", - "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 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "edition": "proto2", - "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 - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19 - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "edition": "proto2", - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "edition": "proto2", - "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 - } - } - } - } - }, - "FeatureSet": { - "edition": "proto2", - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "edition": "proto2", - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "edition": "proto2", - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2, - "options": { - "packed": true - } - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "edition": "proto2", - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Struct": { - "fields": { - "fields": { - "keyType": "string", - "type": "Value", - "id": 1 - } - } - }, - "Value": { - "oneofs": { - "kind": { - "oneof": [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" - ] - } - }, - "fields": { - "nullValue": { - "type": "NullValue", - "id": 1 - }, - "numberValue": { - "type": "double", - "id": 2 - }, - "stringValue": { - "type": "string", - "id": 3 - }, - "boolValue": { - "type": "bool", - "id": 4 - }, - "structValue": { - "type": "Struct", - "id": 5 - }, - "listValue": { - "type": "ListValue", - "id": 6 - } - } - }, - "NullValue": { - "values": { - "NULL_VALUE": 0 - } - }, - "ListValue": { - "fields": { - "values": { - "rule": "repeated", - "type": "Value", - "id": 1 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "longrunning": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.LongRunning", - "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", - "java_multiple_files": true, - "java_outer_classname": "OperationsProto", - "java_package": "com.google.longrunning", - "php_namespace": "Google\\LongRunning" - }, - "nested": { - "operationInfo": { - "type": "google.longrunning.OperationInfo", - "id": 1049, - "extend": "google.protobuf.MethodOptions" - }, - "Operations": { - "options": { - "(google.api.default_host)": "longrunning.googleapis.com" - }, - "methods": { - "ListOperations": { - "requestType": "ListOperationsRequest", - "responseType": "ListOperationsResponse", - "options": { - "(google.api.http).get": "/v1/{name=operations}", - "(google.api.method_signature)": "name,filter" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations}" - } - }, - { - "(google.api.method_signature)": "name,filter" - } - ] - }, - "GetOperation": { - "requestType": "GetOperationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).get": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteOperation": { - "requestType": "DeleteOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CancelOperation": { - "requestType": "CancelOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=operations/**}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=operations/**}:cancel", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "WaitOperation": { - "requestType": "WaitOperationRequest", - "responseType": "Operation" - } - } - }, - "Operation": { - "oneofs": { - "result": { - "oneof": [ - "error", - "response" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "metadata": { - "type": "google.protobuf.Any", - "id": 2 - }, - "done": { - "type": "bool", - "id": 3 - }, - "error": { - "type": "google.rpc.Status", - "id": 4 - }, - "response": { - "type": "google.protobuf.Any", - "id": 5 - } - } - }, - "GetOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ListOperationsRequest": { - "fields": { - "name": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListOperationsResponse": { - "fields": { - "operations": { - "rule": "repeated", - "type": "Operation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CancelOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "DeleteOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "WaitOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "timeout": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - }, - "OperationInfo": { - "fields": { - "responseType": { - "type": "string", - "id": 1 - }, - "metadataType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_deployment.js deleted file mode 100644 index dd27af30fc1..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_deployment.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, deploymentId, deployment) { - // [START config_v1_generated_Config_CreateDeployment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the Deployment is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - */ - // const parent = 'abc123' - /** - * Required. The Deployment ID. - */ - // const deploymentId = 'abc123' - /** - * Required. Deployment google.cloud.config.v1.Deployment resource to be - * created. - */ - // const deployment = {} - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callCreateDeployment() { - // Construct request - const request = { - parent, - deploymentId, - deployment, - }; - - // Run request - const [operation] = await configClient.createDeployment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateDeployment(); - // [END config_v1_generated_Config_CreateDeployment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_preview.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_preview.js deleted file mode 100644 index d5794baa2e6..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.create_preview.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, preview) { - // [START config_v1_generated_Config_CreatePreview_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the Preview is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - */ - // const parent = 'abc123' - /** - * Optional. The preview ID. - */ - // const previewId = 'abc123' - /** - * Required. Preview google.cloud.config.v1.Preview resource to be created. - */ - // const preview = {} - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callCreatePreview() { - // Construct request - const request = { - parent, - preview, - }; - - // Run request - const [operation] = await configClient.createPreview(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreatePreview(); - // [END config_v1_generated_Config_CreatePreview_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_deployment.js deleted file mode 100644 index 84a517e7bde..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_deployment.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START config_v1_generated_Config_DeleteDeployment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - */ - // const name = 'abc123' - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, any revisions for this deployment will also be - * deleted. (Otherwise, the request will only work if the deployment has no - * revisions.) - */ - // const force = true - /** - * Optional. Policy on how resources actuated by the deployment should be - * deleted. If unspecified, the default behavior is to delete the underlying - * resources. - */ - // const deletePolicy = {} - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callDeleteDeployment() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await configClient.deleteDeployment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteDeployment(); - // [END config_v1_generated_Config_DeleteDeployment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_preview.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_preview.js deleted file mode 100644 index 4e62f8376be..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_preview.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START config_v1_generated_Config_DeletePreview_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Preview in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - */ - // const name = 'abc123' - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callDeletePreview() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await configClient.deletePreview(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeletePreview(); - // [END config_v1_generated_Config_DeletePreview_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_statefile.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_statefile.js deleted file mode 100644 index 801f4b27f4b..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.delete_statefile.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, lockId) { - // [START config_v1_generated_Config_DeleteStatefile_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - */ - // const name = 'abc123' - /** - * Required. Lock ID of the lock file to verify that the user who is deleting - * the state file previously locked the Deployment. - */ - // const lockId = 1234 - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callDeleteStatefile() { - // Construct request - const request = { - name, - lockId, - }; - - // Run request - const response = await configClient.deleteStatefile(request); - console.log(response); - } - - callDeleteStatefile(); - // [END config_v1_generated_Config_DeleteStatefile_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js deleted file mode 100644 index c010a9b1c04..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START config_v1_generated_Config_ExportDeploymentStatefile_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - */ - // const parent = 'abc123' - /** - * Optional. If this flag is set to true, the exported deployment state file - * will be the draft state. This will enable the draft file to be validated - * before copying it over to the working state on unlock. - */ - // const draft = true - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callExportDeploymentStatefile() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await configClient.exportDeploymentStatefile(request); - console.log(response); - } - - callExportDeploymentStatefile(); - // [END config_v1_generated_Config_ExportDeploymentStatefile_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_lock_info.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_lock_info.js deleted file mode 100644 index 177d9e4cce6..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_lock_info.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START config_v1_generated_Config_ExportLockInfo_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - */ - // const name = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callExportLockInfo() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await configClient.exportLockInfo(request); - console.log(response); - } - - callExportLockInfo(); - // [END config_v1_generated_Config_ExportLockInfo_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_preview_result.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_preview_result.js deleted file mode 100644 index 1b57cac143a..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_preview_result.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START config_v1_generated_Config_ExportPreviewResult_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The preview whose results should be exported. The preview value - * is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - */ - // const parent = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callExportPreviewResult() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await configClient.exportPreviewResult(request); - console.log(response); - } - - callExportPreviewResult(); - // [END config_v1_generated_Config_ExportPreviewResult_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js deleted file mode 100644 index d84fafc8b72..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START config_v1_generated_Config_ExportRevisionStatefile_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - */ - // const parent = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callExportRevisionStatefile() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await configClient.exportRevisionStatefile(request); - console.log(response); - } - - callExportRevisionStatefile(); - // [END config_v1_generated_Config_ExportRevisionStatefile_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_deployment.js deleted file mode 100644 index ee6136e7cfc..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_deployment.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START config_v1_generated_Config_GetDeployment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the deployment. Format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - */ - // const name = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callGetDeployment() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await configClient.getDeployment(request); - console.log(response); - } - - callGetDeployment(); - // [END config_v1_generated_Config_GetDeployment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_preview.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_preview.js deleted file mode 100644 index b09e7592be3..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_preview.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START config_v1_generated_Config_GetPreview_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the preview. Format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - */ - // const name = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callGetPreview() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await configClient.getPreview(request); - console.log(response); - } - - callGetPreview(); - // [END config_v1_generated_Config_GetPreview_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource.js deleted file mode 100644 index 9bd42763798..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START config_v1_generated_Config_GetResource_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Resource in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. - */ - // const name = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callGetResource() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await configClient.getResource(request); - console.log(response); - } - - callGetResource(); - // [END config_v1_generated_Config_GetResource_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_change.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_change.js deleted file mode 100644 index 6e0f19df635..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_change.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START config_v1_generated_Config_GetResourceChange_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the resource change to retrieve. - * Format: - * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. - */ - // const name = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callGetResourceChange() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await configClient.getResourceChange(request); - console.log(response); - } - - callGetResourceChange(); - // [END config_v1_generated_Config_GetResourceChange_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_drift.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_drift.js deleted file mode 100644 index 8c9ef3b5a9e..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_resource_drift.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START config_v1_generated_Config_GetResourceDrift_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the resource drift to retrieve. - * Format: - * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. - */ - // const name = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callGetResourceDrift() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await configClient.getResourceDrift(request); - console.log(response); - } - - callGetResourceDrift(); - // [END config_v1_generated_Config_GetResourceDrift_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_revision.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_revision.js deleted file mode 100644 index 0e90690afe6..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_revision.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START config_v1_generated_Config_GetRevision_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Revision in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - */ - // const name = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callGetRevision() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await configClient.getRevision(request); - console.log(response); - } - - callGetRevision(); - // [END config_v1_generated_Config_GetRevision_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_terraform_version.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_terraform_version.js deleted file mode 100644 index b8afed8589b..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_terraform_version.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START config_v1_generated_Config_GetTerraformVersion_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the TerraformVersion. Format: - * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}' - */ - // const name = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callGetTerraformVersion() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await configClient.getTerraformVersion(request); - console.log(response); - } - - callGetTerraformVersion(); - // [END config_v1_generated_Config_GetTerraformVersion_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.import_statefile.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.import_statefile.js deleted file mode 100644 index cc21a501e90..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.import_statefile.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, lockId) { - // [START config_v1_generated_Config_ImportStatefile_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - */ - // const parent = 'abc123' - /** - * Required. Lock ID of the lock file to verify that the user who is importing - * the state file previously locked the Deployment. - */ - // const lockId = 1234 - /** - * Optional. - */ - // const skipDraft = true - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callImportStatefile() { - // Construct request - const request = { - parent, - lockId, - }; - - // Run request - const response = await configClient.importStatefile(request); - console.log(response); - } - - callImportStatefile(); - // [END config_v1_generated_Config_ImportStatefile_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_deployments.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_deployments.js deleted file mode 100644 index 110414edd52..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_deployments.js +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START config_v1_generated_Config_ListDeployments_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the Deployments are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - */ - // const parent = 'abc123' - /** - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - */ - // const pageSize = 1234 - /** - * Token returned by previous call to 'ListDeployments' which specifies the - * position in the list from where to continue listing the resources. - */ - // const pageToken = 'abc123' - /** - * Lists the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - */ - // const filter = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callListDeployments() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = configClient.listDeploymentsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDeployments(); - // [END config_v1_generated_Config_ListDeployments_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_previews.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_previews.js deleted file mode 100644 index 5003a95b2e6..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_previews.js +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START config_v1_generated_Config_ListPreviews_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the Previews are listed. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - */ - // const parent = 'abc123' - /** - * Optional. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - */ - // const pageSize = 1234 - /** - * Optional. Token returned by previous call to 'ListDeployments' which - * specifies the position in the list from where to continue listing the - * resources. - */ - // const pageToken = 'abc123' - /** - * Optional. Lists the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - */ - // const filter = 'abc123' - /** - * Optional. Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callListPreviews() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = configClient.listPreviewsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListPreviews(); - // [END config_v1_generated_Config_ListPreviews_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_changes.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_changes.js deleted file mode 100644 index 7cbbfca0c85..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_changes.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START config_v1_generated_Config_ListResourceChanges_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the ResourceChanges are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - */ - // const parent = 'abc123' - /** - * Optional. When requesting a page of resource changes, 'page_size' specifies - * number of resource changes to return. If unspecified, at most 500 will be - * returned. The maximum value is 1000. - */ - // const pageSize = 1234 - /** - * Optional. Token returned by previous call to 'ListResourceChanges' which - * specifies the position in the list from where to continue listing the - * resource changes. - */ - // const pageToken = 'abc123' - /** - * Optional. Lists the resource changes that match the filter expression. A - * filter expression filters the resource changes listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz - */ - // const filter = 'abc123' - /** - * Optional. Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callListResourceChanges() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = configClient.listResourceChangesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListResourceChanges(); - // [END config_v1_generated_Config_ListResourceChanges_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js deleted file mode 100644 index 7ace24aad25..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START config_v1_generated_Config_ListResourceDrifts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the ResourceDrifts are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - */ - // const parent = 'abc123' - /** - * Optional. When requesting a page of resource drifts, 'page_size' specifies - * number of resource drifts to return. If unspecified, at most 500 will be - * returned. The maximum value is 1000. - */ - // const pageSize = 1234 - /** - * Optional. Token returned by previous call to 'ListResourceDrifts' which - * specifies the position in the list from where to continue listing the - * resource drifts. - */ - // const pageToken = 'abc123' - /** - * Optional. Lists the resource drifts that match the filter expression. A - * filter expression filters the resource drifts listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz - */ - // const filter = 'abc123' - /** - * Optional. Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callListResourceDrifts() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = configClient.listResourceDriftsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListResourceDrifts(); - // [END config_v1_generated_Config_ListResourceDrifts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resources.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resources.js deleted file mode 100644 index c66734c42d2..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_resources.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START config_v1_generated_Config_ListResources_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the Resources are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - */ - // const parent = 'abc123' - /** - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - */ - // const pageSize = 1234 - /** - * Token returned by previous call to 'ListResources' which specifies the - * position in the list from where to continue listing the resources. - */ - // const pageToken = 'abc123' - /** - * Lists the Resources that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz - */ - // const filter = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callListResources() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = configClient.listResourcesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListResources(); - // [END config_v1_generated_Config_ListResources_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_revisions.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_revisions.js deleted file mode 100644 index 34e18f6d4c6..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_revisions.js +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START config_v1_generated_Config_ListRevisions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the Revisions are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - */ - // const parent = 'abc123' - /** - * When requesting a page of resources, `page_size` specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - */ - // const pageSize = 1234 - /** - * Token returned by previous call to 'ListRevisions' which specifies the - * position in the list from where to continue listing the resources. - */ - // const pageToken = 'abc123' - /** - * Lists the Revisions that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - Filter by state: - * - Revisions in CREATING state. - * state=CREATING - */ - // const filter = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callListRevisions() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = configClient.listRevisionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListRevisions(); - // [END config_v1_generated_Config_ListRevisions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js deleted file mode 100644 index 1f0d2b40a0f..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START config_v1_generated_Config_ListTerraformVersions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent in whose context the TerraformVersions are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - */ - // const parent = 'abc123' - /** - * Optional. When requesting a page of terraform versions, 'page_size' - * specifies number of terraform versions to return. If unspecified, at most - * 500 will be returned. The maximum value is 1000. - */ - // const pageSize = 1234 - /** - * Optional. Token returned by previous call to 'ListTerraformVersions' which - * specifies the position in the list from where to continue listing the - * terraform versions. - */ - // const pageToken = 'abc123' - /** - * Optional. Lists the TerraformVersions that match the filter expression. A - * filter expression filters the resources listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - */ - // const filter = 'abc123' - /** - * Optional. Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callListTerraformVersions() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = configClient.listTerraformVersionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTerraformVersions(); - // [END config_v1_generated_Config_ListTerraformVersions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.lock_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.lock_deployment.js deleted file mode 100644 index 1f8dabc4255..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.lock_deployment.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START config_v1_generated_Config_LockDeployment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - */ - // const name = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callLockDeployment() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await configClient.lockDeployment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callLockDeployment(); - // [END config_v1_generated_Config_LockDeployment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.unlock_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.unlock_deployment.js deleted file mode 100644 index 0a70fa290e1..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.unlock_deployment.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, lockId) { - // [START config_v1_generated_Config_UnlockDeployment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - */ - // const name = 'abc123' - /** - * Required. Lock ID of the lock file to be unlocked. - */ - // const lockId = 1234 - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callUnlockDeployment() { - // Construct request - const request = { - name, - lockId, - }; - - // Run request - const [operation] = await configClient.unlockDeployment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUnlockDeployment(); - // [END config_v1_generated_Config_UnlockDeployment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_deployment.js b/owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_deployment.js deleted file mode 100644 index dacf8c07d91..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_deployment.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(deployment) { - // [START config_v1_generated_Config_UpdateDeployment_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. - */ - /** - * Optional. Field mask used to specify the fields to be overwritten in the - * Deployment resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - */ - // const updateMask = {} - /** - * Required. Deployment google.cloud.config.v1.Deployment to update. - * The deployment's `name` field is used to identify the resource to be - * updated. Format: - * `projects/{project}/locations/{location}/deployments/{deployment}` - */ - // const deployment = {} - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - - // Imports the Config library - const {ConfigClient} = require('@google-cloud/config').v1; - - // Instantiates a client - const configClient = new ConfigClient(); - - async function callUpdateDeployment() { - // Construct request - const request = { - deployment, - }; - - // Run request - const [operation] = await configClient.updateDeployment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateDeployment(); - // [END config_v1_generated_Config_UpdateDeployment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json b/owl-bot-staging/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json deleted file mode 100644 index ab843bf1d64..00000000000 --- a/owl-bot-staging/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json +++ /dev/null @@ -1,1359 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-config", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.config.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "config_v1_generated_Config_ListDeployments_async", - "title": "Config listDeployments Sample", - "origin": "API_DEFINITION", - "description": " Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.", - "canonical": true, - "file": "config.list_deployments.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 93, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDeployments", - "fullName": "google.cloud.config.v1.Config.ListDeployments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.ListDeploymentsResponse", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ListDeployments", - "fullName": "google.cloud.config.v1.Config.ListDeployments", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_GetDeployment_async", - "title": "Config getDeployment Sample", - "origin": "API_DEFINITION", - "description": " Gets details about a [Deployment][google.cloud.config.v1.Deployment].", - "canonical": true, - "file": "config.get_deployment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDeployment", - "fullName": "google.cloud.config.v1.Config.GetDeployment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.Deployment", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "GetDeployment", - "fullName": "google.cloud.config.v1.Config.GetDeployment", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_CreateDeployment_async", - "title": "Config createDeployment Sample", - "origin": "API_DEFINITION", - "description": " Creates a [Deployment][google.cloud.config.v1.Deployment].", - "canonical": true, - "file": "config.create_deployment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDeployment", - "fullName": "google.cloud.config.v1.Config.CreateDeployment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "deployment_id", - "type": "TYPE_STRING" - }, - { - "name": "deployment", - "type": ".google.cloud.config.v1.Deployment" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "CreateDeployment", - "fullName": "google.cloud.config.v1.Config.CreateDeployment", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_UpdateDeployment_async", - "title": "Config updateDeployment Sample", - "origin": "API_DEFINITION", - "description": " Updates a [Deployment][google.cloud.config.v1.Deployment].", - "canonical": true, - "file": "config.update_deployment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDeployment", - "fullName": "google.cloud.config.v1.Config.UpdateDeployment", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "deployment", - "type": ".google.cloud.config.v1.Deployment" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "UpdateDeployment", - "fullName": "google.cloud.config.v1.Config.UpdateDeployment", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_DeleteDeployment_async", - "title": "Config deleteDeployment Sample", - "origin": "API_DEFINITION", - "description": " Deletes a [Deployment][google.cloud.config.v1.Deployment].", - "canonical": true, - "file": "config.delete_deployment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDeployment", - "fullName": "google.cloud.config.v1.Config.DeleteDeployment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - }, - { - "name": "delete_policy", - "type": ".google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "DeleteDeployment", - "fullName": "google.cloud.config.v1.Config.DeleteDeployment", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_ListRevisions_async", - "title": "Config listRevisions Sample", - "origin": "API_DEFINITION", - "description": " Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.", - "canonical": true, - "file": "config.list_revisions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 93, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListRevisions", - "fullName": "google.cloud.config.v1.Config.ListRevisions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.ListRevisionsResponse", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ListRevisions", - "fullName": "google.cloud.config.v1.Config.ListRevisions", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_GetRevision_async", - "title": "Config getRevision Sample", - "origin": "API_DEFINITION", - "description": " Gets details about a [Revision][google.cloud.config.v1.Revision].", - "canonical": true, - "file": "config.get_revision.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetRevision", - "fullName": "google.cloud.config.v1.Config.GetRevision", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.Revision", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "GetRevision", - "fullName": "google.cloud.config.v1.Config.GetRevision", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_GetResource_async", - "title": "Config getResource Sample", - "origin": "API_DEFINITION", - "description": " Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager.", - "canonical": true, - "file": "config.get_resource.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetResource", - "fullName": "google.cloud.config.v1.Config.GetResource", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.Resource", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "GetResource", - "fullName": "google.cloud.config.v1.Config.GetResource", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_ListResources_async", - "title": "Config listResources Sample", - "origin": "API_DEFINITION", - "description": " Lists [Resources][google.cloud.config.v1.Resource] in a given revision.", - "canonical": true, - "file": "config.list_resources.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListResources", - "fullName": "google.cloud.config.v1.Config.ListResources", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.ListResourcesResponse", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ListResources", - "fullName": "google.cloud.config.v1.Config.ListResources", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_ExportDeploymentStatefile_async", - "title": "Config exportDeploymentStatefile Sample", - "origin": "API_DEFINITION", - "description": " Exports Terraform state file from a given deployment.", - "canonical": true, - "file": "config.export_deployment_statefile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportDeploymentStatefile", - "fullName": "google.cloud.config.v1.Config.ExportDeploymentStatefile", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "draft", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.config.v1.Statefile", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ExportDeploymentStatefile", - "fullName": "google.cloud.config.v1.Config.ExportDeploymentStatefile", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_ExportRevisionStatefile_async", - "title": "Config exportRevisionStatefile Sample", - "origin": "API_DEFINITION", - "description": " Exports Terraform state file from a given revision.", - "canonical": true, - "file": "config.export_revision_statefile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportRevisionStatefile", - "fullName": "google.cloud.config.v1.Config.ExportRevisionStatefile", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.Statefile", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ExportRevisionStatefile", - "fullName": "google.cloud.config.v1.Config.ExportRevisionStatefile", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_ImportStatefile_async", - "title": "Config importStatefile Sample", - "origin": "API_DEFINITION", - "description": " Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.", - "canonical": true, - "file": "config.import_statefile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportStatefile", - "fullName": "google.cloud.config.v1.Config.ImportStatefile", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "lock_id", - "type": "TYPE_INT64" - }, - { - "name": "skip_draft", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.config.v1.Statefile", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ImportStatefile", - "fullName": "google.cloud.config.v1.Config.ImportStatefile", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_DeleteStatefile_async", - "title": "Config deleteStatefile Sample", - "origin": "API_DEFINITION", - "description": " Deletes Terraform state file in a given deployment.", - "canonical": true, - "file": "config.delete_statefile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteStatefile", - "fullName": "google.cloud.config.v1.Config.DeleteStatefile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "lock_id", - "type": "TYPE_INT64" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "DeleteStatefile", - "fullName": "google.cloud.config.v1.Config.DeleteStatefile", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_LockDeployment_async", - "title": "Config lockDeployment Sample", - "origin": "API_DEFINITION", - "description": " Locks a deployment.", - "canonical": true, - "file": "config.lock_deployment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "LockDeployment", - "fullName": "google.cloud.config.v1.Config.LockDeployment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "LockDeployment", - "fullName": "google.cloud.config.v1.Config.LockDeployment", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_UnlockDeployment_async", - "title": "Config unlockDeployment Sample", - "origin": "API_DEFINITION", - "description": " Unlocks a locked deployment.", - "canonical": true, - "file": "config.unlock_deployment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UnlockDeployment", - "fullName": "google.cloud.config.v1.Config.UnlockDeployment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "lock_id", - "type": "TYPE_INT64" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "UnlockDeployment", - "fullName": "google.cloud.config.v1.Config.UnlockDeployment", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_ExportLockInfo_async", - "title": "Config exportLockInfo Sample", - "origin": "API_DEFINITION", - "description": " Exports the lock info on a locked deployment.", - "canonical": true, - "file": "config.export_lock_info.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportLockInfo", - "fullName": "google.cloud.config.v1.Config.ExportLockInfo", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.LockInfo", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ExportLockInfo", - "fullName": "google.cloud.config.v1.Config.ExportLockInfo", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_CreatePreview_async", - "title": "Config createPreview Sample", - "origin": "API_DEFINITION", - "description": " Creates a [Preview][google.cloud.config.v1.Preview].", - "canonical": true, - "file": "config.create_preview.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreatePreview", - "fullName": "google.cloud.config.v1.Config.CreatePreview", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "preview_id", - "type": "TYPE_STRING" - }, - { - "name": "preview", - "type": ".google.cloud.config.v1.Preview" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "CreatePreview", - "fullName": "google.cloud.config.v1.Config.CreatePreview", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_GetPreview_async", - "title": "Config getPreview Sample", - "origin": "API_DEFINITION", - "description": " Gets details about a [Preview][google.cloud.config.v1.Preview].", - "canonical": true, - "file": "config.get_preview.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPreview", - "fullName": "google.cloud.config.v1.Config.GetPreview", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.Preview", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "GetPreview", - "fullName": "google.cloud.config.v1.Config.GetPreview", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_ListPreviews_async", - "title": "Config listPreviews Sample", - "origin": "API_DEFINITION", - "description": " Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.", - "canonical": true, - "file": "config.list_previews.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 93, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPreviews", - "fullName": "google.cloud.config.v1.Config.ListPreviews", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.ListPreviewsResponse", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ListPreviews", - "fullName": "google.cloud.config.v1.Config.ListPreviews", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_DeletePreview_async", - "title": "Config deletePreview Sample", - "origin": "API_DEFINITION", - "description": " Deletes a [Preview][google.cloud.config.v1.Preview].", - "canonical": true, - "file": "config.delete_preview.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePreview", - "fullName": "google.cloud.config.v1.Config.DeletePreview", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "DeletePreview", - "fullName": "google.cloud.config.v1.Config.DeletePreview", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_ExportPreviewResult_async", - "title": "Config exportPreviewResult Sample", - "origin": "API_DEFINITION", - "description": " Export [Preview][google.cloud.config.v1.Preview] results.", - "canonical": true, - "file": "config.export_preview_result.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportPreviewResult", - "fullName": "google.cloud.config.v1.Config.ExportPreviewResult", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.ExportPreviewResultResponse", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ExportPreviewResult", - "fullName": "google.cloud.config.v1.Config.ExportPreviewResult", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_ListTerraformVersions_async", - "title": "Config listTerraformVersions Sample", - "origin": "API_DEFINITION", - "description": " Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.", - "canonical": true, - "file": "config.list_terraform_versions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTerraformVersions", - "fullName": "google.cloud.config.v1.Config.ListTerraformVersions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.ListTerraformVersionsResponse", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ListTerraformVersions", - "fullName": "google.cloud.config.v1.Config.ListTerraformVersions", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_GetTerraformVersion_async", - "title": "Config getTerraformVersion Sample", - "origin": "API_DEFINITION", - "description": " Gets details about a [TerraformVersion][google.cloud.config.v1.TerraformVersion].", - "canonical": true, - "file": "config.get_terraform_version.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTerraformVersion", - "fullName": "google.cloud.config.v1.Config.GetTerraformVersion", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.TerraformVersion", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "GetTerraformVersion", - "fullName": "google.cloud.config.v1.Config.GetTerraformVersion", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_ListResourceChanges_async", - "title": "Config listResourceChanges Sample", - "origin": "API_DEFINITION", - "description": " Lists ResourceChanges for a given preview.", - "canonical": true, - "file": "config.list_resource_changes.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 89, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListResourceChanges", - "fullName": "google.cloud.config.v1.Config.ListResourceChanges", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.ListResourceChangesResponse", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ListResourceChanges", - "fullName": "google.cloud.config.v1.Config.ListResourceChanges", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_GetResourceChange_async", - "title": "Config getResourceChange Sample", - "origin": "API_DEFINITION", - "description": " Get a ResourceChange for a given preview.", - "canonical": true, - "file": "config.get_resource_change.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetResourceChange", - "fullName": "google.cloud.config.v1.Config.GetResourceChange", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.ResourceChange", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "GetResourceChange", - "fullName": "google.cloud.config.v1.Config.GetResourceChange", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_ListResourceDrifts_async", - "title": "Config listResourceDrifts Sample", - "origin": "API_DEFINITION", - "description": " List ResourceDrifts for a given preview.", - "canonical": true, - "file": "config.list_resource_drifts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 89, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListResourceDrifts", - "fullName": "google.cloud.config.v1.Config.ListResourceDrifts", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.ListResourceDriftsResponse", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "ListResourceDrifts", - "fullName": "google.cloud.config.v1.Config.ListResourceDrifts", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_GetResourceDrift_async", - "title": "Config getResourceDrift Sample", - "origin": "API_DEFINITION", - "description": " Get a ResourceDrift for a given preview.", - "canonical": true, - "file": "config.get_resource_drift.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetResourceDrift", - "fullName": "google.cloud.config.v1.Config.GetResourceDrift", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.ResourceDrift", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "GetResourceDrift", - "fullName": "google.cloud.config.v1.Config.GetResourceDrift", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_GetAutoMigrationConfig_async", - "title": "Config getAutoMigrationConfig Sample", - "origin": "API_DEFINITION", - "description": " Get the AutoMigrationConfig for a given project and location.", - "canonical": true, - "file": "config.get_auto_migration_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAutoMigrationConfig", - "fullName": "google.cloud.config.v1.Config.GetAutoMigrationConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.config.v1.AutoMigrationConfig", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "GetAutoMigrationConfig", - "fullName": "google.cloud.config.v1.Config.GetAutoMigrationConfig", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - }, - { - "regionTag": "config_v1_generated_Config_UpdateAutoMigrationConfig_async", - "title": "Config updateAutoMigrationConfig Sample", - "origin": "API_DEFINITION", - "description": " Updates the AutoMigrationConfig for a given project and location.", - "canonical": true, - "file": "config.update_auto_migration_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAutoMigrationConfig", - "fullName": "google.cloud.config.v1.Config.UpdateAutoMigrationConfig", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "auto_migration_config", - "type": ".google.cloud.config.v1.AutoMigrationConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.config.v1.ConfigClient" - }, - "method": { - "shortName": "UpdateAutoMigrationConfig", - "fullName": "google.cloud.config.v1.Config.UpdateAutoMigrationConfig", - "service": { - "shortName": "Config", - "fullName": "google.cloud.config.v1.Config" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-config/src/index.ts b/owl-bot-staging/google-cloud-config/src/index.ts deleted file mode 100644 index e74be450ee7..00000000000 --- a/owl-bot-staging/google-cloud-config/src/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by synthtool. ** -// ** https://github.com/googleapis/synthtool ** -// ** All changes to this file may be overwritten. ** - -import * as v1 from './v1'; - -const ConfigClient = v1.ConfigClient; -type ConfigClient = v1.ConfigClient; - -export {v1, ConfigClient}; -export default {v1, ConfigClient}; -import * as protos from '../protos/protos'; -export {protos}; diff --git a/owl-bot-staging/google-cloud-config/src/v1/config_client.ts b/owl-bot-staging/google-cloud-config/src/v1/config_client.ts deleted file mode 100644 index db62f4c8f86..00000000000 --- a/owl-bot-staging/google-cloud-config/src/v1/config_client.ts +++ /dev/null @@ -1,5673 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, IamClient, IamProtos, LocationsClient, LocationProtos} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v1/config_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './config_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Infrastructure Manager is a managed service that automates the deployment and - * management of Google Cloud infrastructure resources. - * @class - * @memberof v1 - */ -export class ConfigClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('config'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - iamClient: IamClient; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - configStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ConfigClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * 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 ConfigClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof ConfigClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'config.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - 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 ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); - - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - autoMigrationConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/autoMigrationConfig' - ), - deploymentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/deployments/{deployment}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - previewPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/previews/{preview}' - ), - resourcePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}' - ), - resourceChangePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}' - ), - resourceDriftPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}' - ), - revisionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}' - ), - serviceAccountPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/serviceAccounts/{service_account}' - ), - terraformVersionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/terraformVersions/{terraform_version}' - ), - workerPoolPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/workerPools/{worker_pool}' - ), - }; - - // Some of the methods on this service return "paged" results, - // (e.g. 50 results at a time, with tokens to get subsequent - // pages). Denote the keys used for pagination and results. - this.descriptors.page = { - listDeployments: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'deployments'), - listRevisions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'revisions'), - listResources: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources'), - listPreviews: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'previews'), - listTerraformVersions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'terraformVersions'), - listResourceChanges: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resourceChanges'), - listResourceDrifts: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resourceDrifts') - }; - - const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback) { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/deployments/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/deployments/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/deployments/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createDeploymentResponse = protoFilesRoot.lookup( - '.google.cloud.config.v1.Deployment') as gax.protobuf.Type; - const createDeploymentMetadata = protoFilesRoot.lookup( - '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; - const updateDeploymentResponse = protoFilesRoot.lookup( - '.google.cloud.config.v1.Deployment') as gax.protobuf.Type; - const updateDeploymentMetadata = protoFilesRoot.lookup( - '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; - const deleteDeploymentResponse = protoFilesRoot.lookup( - '.google.cloud.config.v1.Deployment') as gax.protobuf.Type; - const deleteDeploymentMetadata = protoFilesRoot.lookup( - '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; - const lockDeploymentResponse = protoFilesRoot.lookup( - '.google.cloud.config.v1.Deployment') as gax.protobuf.Type; - const lockDeploymentMetadata = protoFilesRoot.lookup( - '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; - const unlockDeploymentResponse = protoFilesRoot.lookup( - '.google.cloud.config.v1.Deployment') as gax.protobuf.Type; - const unlockDeploymentMetadata = protoFilesRoot.lookup( - '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; - const createPreviewResponse = protoFilesRoot.lookup( - '.google.cloud.config.v1.Preview') as gax.protobuf.Type; - const createPreviewMetadata = protoFilesRoot.lookup( - '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; - const deletePreviewResponse = protoFilesRoot.lookup( - '.google.cloud.config.v1.Preview') as gax.protobuf.Type; - const deletePreviewMetadata = protoFilesRoot.lookup( - '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; - const updateAutoMigrationConfigResponse = protoFilesRoot.lookup( - '.google.cloud.config.v1.AutoMigrationConfig') as gax.protobuf.Type; - const updateAutoMigrationConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createDeployment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createDeploymentResponse.decode.bind(createDeploymentResponse), - createDeploymentMetadata.decode.bind(createDeploymentMetadata)), - updateDeployment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateDeploymentResponse.decode.bind(updateDeploymentResponse), - updateDeploymentMetadata.decode.bind(updateDeploymentMetadata)), - deleteDeployment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteDeploymentResponse.decode.bind(deleteDeploymentResponse), - deleteDeploymentMetadata.decode.bind(deleteDeploymentMetadata)), - lockDeployment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - lockDeploymentResponse.decode.bind(lockDeploymentResponse), - lockDeploymentMetadata.decode.bind(lockDeploymentMetadata)), - unlockDeployment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - unlockDeploymentResponse.decode.bind(unlockDeploymentResponse), - unlockDeploymentMetadata.decode.bind(unlockDeploymentMetadata)), - createPreview: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createPreviewResponse.decode.bind(createPreviewResponse), - createPreviewMetadata.decode.bind(createPreviewMetadata)), - deletePreview: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deletePreviewResponse.decode.bind(deletePreviewResponse), - deletePreviewMetadata.decode.bind(deletePreviewMetadata)), - updateAutoMigrationConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateAutoMigrationConfigResponse.decode.bind(updateAutoMigrationConfigResponse), - updateAutoMigrationConfigMetadata.decode.bind(updateAutoMigrationConfigMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.config.v1.Config', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.configStub) { - return this.configStub; - } - - // Put together the "service stub" for - // google.cloud.config.v1.Config. - this.configStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.config.v1.Config') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.config.v1.Config, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const configStubMethods = - ['listDeployments', 'getDeployment', 'createDeployment', 'updateDeployment', 'deleteDeployment', 'listRevisions', 'getRevision', 'getResource', 'listResources', 'exportDeploymentStatefile', 'exportRevisionStatefile', 'importStatefile', 'deleteStatefile', 'lockDeployment', 'unlockDeployment', 'exportLockInfo', 'createPreview', 'getPreview', 'listPreviews', 'deletePreview', 'exportPreviewResult', 'listTerraformVersions', 'getTerraformVersion', 'listResourceChanges', 'getResourceChange', 'listResourceDrifts', 'getResourceDrift', 'getAutoMigrationConfig', 'updateAutoMigrationConfig']; - for (const methodName of configStubMethods) { - const callPromise = this.configStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - this.descriptors.longrunning[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.configStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'config.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'config.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * Gets details about a {@link protos.google.cloud.config.v1.Deployment|Deployment}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the deployment. Format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Deployment|Deployment}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.get_deployment.js - * region_tag:config_v1_generated_Config_GetDeployment_async - */ - getDeployment( - request?: protos.google.cloud.config.v1.IGetDeploymentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IDeployment, - protos.google.cloud.config.v1.IGetDeploymentRequest|undefined, {}|undefined - ]>; - getDeployment( - request: protos.google.cloud.config.v1.IGetDeploymentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.IDeployment, - protos.google.cloud.config.v1.IGetDeploymentRequest|null|undefined, - {}|null|undefined>): void; - getDeployment( - request: protos.google.cloud.config.v1.IGetDeploymentRequest, - callback: Callback< - protos.google.cloud.config.v1.IDeployment, - protos.google.cloud.config.v1.IGetDeploymentRequest|null|undefined, - {}|null|undefined>): void; - getDeployment( - request?: protos.google.cloud.config.v1.IGetDeploymentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.IDeployment, - protos.google.cloud.config.v1.IGetDeploymentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.IDeployment, - protos.google.cloud.config.v1.IGetDeploymentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.IDeployment, - protos.google.cloud.config.v1.IGetDeploymentRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getDeployment request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.IDeployment, - protos.google.cloud.config.v1.IGetDeploymentRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getDeployment response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getDeployment(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.IDeployment, - protos.google.cloud.config.v1.IGetDeploymentRequest|undefined, - {}|undefined - ]) => { - this._log.info('getDeployment response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets details about a {@link protos.google.cloud.config.v1.Revision|Revision}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the Revision in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Revision|Revision}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.get_revision.js - * region_tag:config_v1_generated_Config_GetRevision_async - */ - getRevision( - request?: protos.google.cloud.config.v1.IGetRevisionRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IRevision, - protos.google.cloud.config.v1.IGetRevisionRequest|undefined, {}|undefined - ]>; - getRevision( - request: protos.google.cloud.config.v1.IGetRevisionRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.IRevision, - protos.google.cloud.config.v1.IGetRevisionRequest|null|undefined, - {}|null|undefined>): void; - getRevision( - request: protos.google.cloud.config.v1.IGetRevisionRequest, - callback: Callback< - protos.google.cloud.config.v1.IRevision, - protos.google.cloud.config.v1.IGetRevisionRequest|null|undefined, - {}|null|undefined>): void; - getRevision( - request?: protos.google.cloud.config.v1.IGetRevisionRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.IRevision, - protos.google.cloud.config.v1.IGetRevisionRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.IRevision, - protos.google.cloud.config.v1.IGetRevisionRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.IRevision, - protos.google.cloud.config.v1.IGetRevisionRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getRevision request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.IRevision, - protos.google.cloud.config.v1.IGetRevisionRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getRevision response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getRevision(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.IRevision, - protos.google.cloud.config.v1.IGetRevisionRequest|undefined, - {}|undefined - ]) => { - this._log.info('getRevision response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets details about a {@link protos.google.cloud.config.v1.Resource|Resource} deployed - * by Infra Manager. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the Resource in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Resource|Resource}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.get_resource.js - * region_tag:config_v1_generated_Config_GetResource_async - */ - getResource( - request?: protos.google.cloud.config.v1.IGetResourceRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IResource, - protos.google.cloud.config.v1.IGetResourceRequest|undefined, {}|undefined - ]>; - getResource( - request: protos.google.cloud.config.v1.IGetResourceRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.IResource, - protos.google.cloud.config.v1.IGetResourceRequest|null|undefined, - {}|null|undefined>): void; - getResource( - request: protos.google.cloud.config.v1.IGetResourceRequest, - callback: Callback< - protos.google.cloud.config.v1.IResource, - protos.google.cloud.config.v1.IGetResourceRequest|null|undefined, - {}|null|undefined>): void; - getResource( - request?: protos.google.cloud.config.v1.IGetResourceRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.IResource, - protos.google.cloud.config.v1.IGetResourceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.IResource, - protos.google.cloud.config.v1.IGetResourceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.IResource, - protos.google.cloud.config.v1.IGetResourceRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getResource request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.IResource, - protos.google.cloud.config.v1.IGetResourceRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getResource response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getResource(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.IResource, - protos.google.cloud.config.v1.IGetResourceRequest|undefined, - {}|undefined - ]) => { - this._log.info('getResource response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Exports Terraform state file from a given deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @param {boolean} [request.draft] - * Optional. If this flag is set to true, the exported deployment state file - * will be the draft state. This will enable the draft file to be validated - * before copying it over to the working state on unlock. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Statefile|Statefile}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.export_deployment_statefile.js - * region_tag:config_v1_generated_Config_ExportDeploymentStatefile_async - */ - exportDeploymentStatefile( - request?: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|undefined, {}|undefined - ]>; - exportDeploymentStatefile( - request: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|null|undefined, - {}|null|undefined>): void; - exportDeploymentStatefile( - request: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, - callback: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|null|undefined, - {}|null|undefined>): void; - exportDeploymentStatefile( - request?: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('exportDeploymentStatefile request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('exportDeploymentStatefile response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.exportDeploymentStatefile(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportDeploymentStatefileRequest|undefined, - {}|undefined - ]) => { - this._log.info('exportDeploymentStatefile response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Exports Terraform state file from a given revision. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Statefile|Statefile}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.export_revision_statefile.js - * region_tag:config_v1_generated_Config_ExportRevisionStatefile_async - */ - exportRevisionStatefile( - request?: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportRevisionStatefileRequest|undefined, {}|undefined - ]>; - exportRevisionStatefile( - request: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportRevisionStatefileRequest|null|undefined, - {}|null|undefined>): void; - exportRevisionStatefile( - request: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, - callback: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportRevisionStatefileRequest|null|undefined, - {}|null|undefined>): void; - exportRevisionStatefile( - request?: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportRevisionStatefileRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportRevisionStatefileRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportRevisionStatefileRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('exportRevisionStatefile request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportRevisionStatefileRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('exportRevisionStatefile response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.exportRevisionStatefile(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IExportRevisionStatefileRequest|undefined, - {}|undefined - ]) => { - this._log.info('exportRevisionStatefile response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Imports Terraform state file in a given deployment. The state file does not - * take effect until the Deployment has been unlocked. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the statefile is listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @param {number} request.lockId - * Required. Lock ID of the lock file to verify that the user who is importing - * the state file previously locked the Deployment. - * @param {boolean} [request.skipDraft] - * Optional. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Statefile|Statefile}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.import_statefile.js - * region_tag:config_v1_generated_Config_ImportStatefile_async - */ - importStatefile( - request?: protos.google.cloud.config.v1.IImportStatefileRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IImportStatefileRequest|undefined, {}|undefined - ]>; - importStatefile( - request: protos.google.cloud.config.v1.IImportStatefileRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IImportStatefileRequest|null|undefined, - {}|null|undefined>): void; - importStatefile( - request: protos.google.cloud.config.v1.IImportStatefileRequest, - callback: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IImportStatefileRequest|null|undefined, - {}|null|undefined>): void; - importStatefile( - request?: protos.google.cloud.config.v1.IImportStatefileRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IImportStatefileRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IImportStatefileRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IImportStatefileRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('importStatefile request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IImportStatefileRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('importStatefile response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.importStatefile(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.IStatefile, - protos.google.cloud.config.v1.IImportStatefileRequest|undefined, - {}|undefined - ]) => { - this._log.info('importStatefile response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Deletes Terraform state file in a given deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @param {number} request.lockId - * Required. Lock ID of the lock file to verify that the user who is deleting - * the state file previously locked the Deployment. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.delete_statefile.js - * region_tag:config_v1_generated_Config_DeleteStatefile_async - */ - deleteStatefile( - request?: protos.google.cloud.config.v1.IDeleteStatefileRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.config.v1.IDeleteStatefileRequest|undefined, {}|undefined - ]>; - deleteStatefile( - request: protos.google.cloud.config.v1.IDeleteStatefileRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.config.v1.IDeleteStatefileRequest|null|undefined, - {}|null|undefined>): void; - deleteStatefile( - request: protos.google.cloud.config.v1.IDeleteStatefileRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.config.v1.IDeleteStatefileRequest|null|undefined, - {}|null|undefined>): void; - deleteStatefile( - request?: protos.google.cloud.config.v1.IDeleteStatefileRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.config.v1.IDeleteStatefileRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.config.v1.IDeleteStatefileRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.config.v1.IDeleteStatefileRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('deleteStatefile request %j', request); - const wrappedCallback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.config.v1.IDeleteStatefileRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('deleteStatefile response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.deleteStatefile(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.protobuf.IEmpty, - protos.google.cloud.config.v1.IDeleteStatefileRequest|undefined, - {}|undefined - ]) => { - this._log.info('deleteStatefile response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Exports the lock info on a locked deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.LockInfo|LockInfo}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.export_lock_info.js - * region_tag:config_v1_generated_Config_ExportLockInfo_async - */ - exportLockInfo( - request?: protos.google.cloud.config.v1.IExportLockInfoRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.ILockInfo, - protos.google.cloud.config.v1.IExportLockInfoRequest|undefined, {}|undefined - ]>; - exportLockInfo( - request: protos.google.cloud.config.v1.IExportLockInfoRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.ILockInfo, - protos.google.cloud.config.v1.IExportLockInfoRequest|null|undefined, - {}|null|undefined>): void; - exportLockInfo( - request: protos.google.cloud.config.v1.IExportLockInfoRequest, - callback: Callback< - protos.google.cloud.config.v1.ILockInfo, - protos.google.cloud.config.v1.IExportLockInfoRequest|null|undefined, - {}|null|undefined>): void; - exportLockInfo( - request?: protos.google.cloud.config.v1.IExportLockInfoRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.ILockInfo, - protos.google.cloud.config.v1.IExportLockInfoRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.ILockInfo, - protos.google.cloud.config.v1.IExportLockInfoRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.ILockInfo, - protos.google.cloud.config.v1.IExportLockInfoRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('exportLockInfo request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.ILockInfo, - protos.google.cloud.config.v1.IExportLockInfoRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('exportLockInfo response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.exportLockInfo(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.ILockInfo, - protos.google.cloud.config.v1.IExportLockInfoRequest|undefined, - {}|undefined - ]) => { - this._log.info('exportLockInfo response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets details about a {@link protos.google.cloud.config.v1.Preview|Preview}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the preview. Format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.Preview|Preview}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.get_preview.js - * region_tag:config_v1_generated_Config_GetPreview_async - */ - getPreview( - request?: protos.google.cloud.config.v1.IGetPreviewRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IPreview, - protos.google.cloud.config.v1.IGetPreviewRequest|undefined, {}|undefined - ]>; - getPreview( - request: protos.google.cloud.config.v1.IGetPreviewRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.IPreview, - protos.google.cloud.config.v1.IGetPreviewRequest|null|undefined, - {}|null|undefined>): void; - getPreview( - request: protos.google.cloud.config.v1.IGetPreviewRequest, - callback: Callback< - protos.google.cloud.config.v1.IPreview, - protos.google.cloud.config.v1.IGetPreviewRequest|null|undefined, - {}|null|undefined>): void; - getPreview( - request?: protos.google.cloud.config.v1.IGetPreviewRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.IPreview, - protos.google.cloud.config.v1.IGetPreviewRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.IPreview, - protos.google.cloud.config.v1.IGetPreviewRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.IPreview, - protos.google.cloud.config.v1.IGetPreviewRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getPreview request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.IPreview, - protos.google.cloud.config.v1.IGetPreviewRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getPreview response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getPreview(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.IPreview, - protos.google.cloud.config.v1.IGetPreviewRequest|undefined, - {}|undefined - ]) => { - this._log.info('getPreview response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Export {@link protos.google.cloud.config.v1.Preview|Preview} results. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The preview whose results should be exported. The preview value - * is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.ExportPreviewResultResponse|ExportPreviewResultResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.export_preview_result.js - * region_tag:config_v1_generated_Config_ExportPreviewResult_async - */ - exportPreviewResult( - request?: protos.google.cloud.config.v1.IExportPreviewResultRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IExportPreviewResultResponse, - protos.google.cloud.config.v1.IExportPreviewResultRequest|undefined, {}|undefined - ]>; - exportPreviewResult( - request: protos.google.cloud.config.v1.IExportPreviewResultRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.IExportPreviewResultResponse, - protos.google.cloud.config.v1.IExportPreviewResultRequest|null|undefined, - {}|null|undefined>): void; - exportPreviewResult( - request: protos.google.cloud.config.v1.IExportPreviewResultRequest, - callback: Callback< - protos.google.cloud.config.v1.IExportPreviewResultResponse, - protos.google.cloud.config.v1.IExportPreviewResultRequest|null|undefined, - {}|null|undefined>): void; - exportPreviewResult( - request?: protos.google.cloud.config.v1.IExportPreviewResultRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.IExportPreviewResultResponse, - protos.google.cloud.config.v1.IExportPreviewResultRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.IExportPreviewResultResponse, - protos.google.cloud.config.v1.IExportPreviewResultRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.IExportPreviewResultResponse, - protos.google.cloud.config.v1.IExportPreviewResultRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('exportPreviewResult request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.IExportPreviewResultResponse, - protos.google.cloud.config.v1.IExportPreviewResultRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('exportPreviewResult response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.exportPreviewResult(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.IExportPreviewResultResponse, - protos.google.cloud.config.v1.IExportPreviewResultRequest|undefined, - {}|undefined - ]) => { - this._log.info('exportPreviewResult response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets details about a - * {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the TerraformVersion. Format: - * 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}' - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.get_terraform_version.js - * region_tag:config_v1_generated_Config_GetTerraformVersion_async - */ - getTerraformVersion( - request?: protos.google.cloud.config.v1.IGetTerraformVersionRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.ITerraformVersion, - protos.google.cloud.config.v1.IGetTerraformVersionRequest|undefined, {}|undefined - ]>; - getTerraformVersion( - request: protos.google.cloud.config.v1.IGetTerraformVersionRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.ITerraformVersion, - protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined, - {}|null|undefined>): void; - getTerraformVersion( - request: protos.google.cloud.config.v1.IGetTerraformVersionRequest, - callback: Callback< - protos.google.cloud.config.v1.ITerraformVersion, - protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined, - {}|null|undefined>): void; - getTerraformVersion( - request?: protos.google.cloud.config.v1.IGetTerraformVersionRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.ITerraformVersion, - protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.ITerraformVersion, - protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.ITerraformVersion, - protos.google.cloud.config.v1.IGetTerraformVersionRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getTerraformVersion request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.ITerraformVersion, - protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getTerraformVersion response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getTerraformVersion(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.ITerraformVersion, - protos.google.cloud.config.v1.IGetTerraformVersionRequest|undefined, - {}|undefined - ]) => { - this._log.info('getTerraformVersion response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Get a ResourceChange for a given preview. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the resource change to retrieve. - * Format: - * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.ResourceChange|ResourceChange}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.get_resource_change.js - * region_tag:config_v1_generated_Config_GetResourceChange_async - */ - getResourceChange( - request?: protos.google.cloud.config.v1.IGetResourceChangeRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IResourceChange, - protos.google.cloud.config.v1.IGetResourceChangeRequest|undefined, {}|undefined - ]>; - getResourceChange( - request: protos.google.cloud.config.v1.IGetResourceChangeRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.IResourceChange, - protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, - {}|null|undefined>): void; - getResourceChange( - request: protos.google.cloud.config.v1.IGetResourceChangeRequest, - callback: Callback< - protos.google.cloud.config.v1.IResourceChange, - protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, - {}|null|undefined>): void; - getResourceChange( - request?: protos.google.cloud.config.v1.IGetResourceChangeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.IResourceChange, - protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.IResourceChange, - protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.IResourceChange, - protos.google.cloud.config.v1.IGetResourceChangeRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getResourceChange request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.IResourceChange, - protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getResourceChange response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getResourceChange(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.IResourceChange, - protos.google.cloud.config.v1.IGetResourceChangeRequest|undefined, - {}|undefined - ]) => { - this._log.info('getResourceChange response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Get a ResourceDrift for a given preview. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the resource drift to retrieve. - * Format: - * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.ResourceDrift|ResourceDrift}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.get_resource_drift.js - * region_tag:config_v1_generated_Config_GetResourceDrift_async - */ - getResourceDrift( - request?: protos.google.cloud.config.v1.IGetResourceDriftRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IResourceDrift, - protos.google.cloud.config.v1.IGetResourceDriftRequest|undefined, {}|undefined - ]>; - getResourceDrift( - request: protos.google.cloud.config.v1.IGetResourceDriftRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.IResourceDrift, - protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, - {}|null|undefined>): void; - getResourceDrift( - request: protos.google.cloud.config.v1.IGetResourceDriftRequest, - callback: Callback< - protos.google.cloud.config.v1.IResourceDrift, - protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, - {}|null|undefined>): void; - getResourceDrift( - request?: protos.google.cloud.config.v1.IGetResourceDriftRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.IResourceDrift, - protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.IResourceDrift, - protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.IResourceDrift, - protos.google.cloud.config.v1.IGetResourceDriftRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getResourceDrift request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.IResourceDrift, - protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getResourceDrift response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getResourceDrift(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.IResourceDrift, - protos.google.cloud.config.v1.IGetResourceDriftRequest|undefined, - {}|undefined - ]) => { - this._log.info('getResourceDrift response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Get the AutoMigrationConfig for a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the AutoMigrationConfig. - * Format: - * 'projects/{project_id}/locations/{location}/AutoMigrationConfig'. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.config.v1.AutoMigrationConfig|AutoMigrationConfig}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.get_auto_migration_config.js - * region_tag:config_v1_generated_Config_GetAutoMigrationConfig_async - */ - getAutoMigrationConfig( - request?: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IAutoMigrationConfig, - protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|undefined, {}|undefined - ]>; - getAutoMigrationConfig( - request: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.config.v1.IAutoMigrationConfig, - protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, - {}|null|undefined>): void; - getAutoMigrationConfig( - request: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, - callback: Callback< - protos.google.cloud.config.v1.IAutoMigrationConfig, - protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, - {}|null|undefined>): void; - getAutoMigrationConfig( - request?: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.config.v1.IAutoMigrationConfig, - protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.config.v1.IAutoMigrationConfig, - protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.config.v1.IAutoMigrationConfig, - protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getAutoMigrationConfig request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.config.v1.IAutoMigrationConfig, - protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getAutoMigrationConfig response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getAutoMigrationConfig(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.config.v1.IAutoMigrationConfig, - protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|undefined, - {}|undefined - ]) => { - this._log.info('getAutoMigrationConfig response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } - -/** - * Creates a {@link protos.google.cloud.config.v1.Deployment|Deployment}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Deployment is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - * @param {string} request.deploymentId - * Required. The Deployment ID. - * @param {google.cloud.config.v1.Deployment} request.deployment - * Required. {@link protos.google.cloud.config.v1.Deployment|Deployment} resource to be - * created. - * @param {string} [request.requestId] - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.create_deployment.js - * region_tag:config_v1_generated_Config_CreateDeployment_async - */ - createDeployment( - request?: protos.google.cloud.config.v1.ICreateDeploymentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createDeployment( - request: protos.google.cloud.config.v1.ICreateDeploymentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDeployment( - request: protos.google.cloud.config.v1.ICreateDeploymentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDeployment( - request?: protos.google.cloud.config.v1.ICreateDeploymentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createDeployment response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createDeployment request %j', request); - return this.innerApiCalls.createDeployment(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createDeployment response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createDeployment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.create_deployment.js - * region_tag:config_v1_generated_Config_CreateDeployment_async - */ - async checkCreateDeploymentProgress(name: string): Promise>{ - this._log.info('createDeployment long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createDeployment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates a {@link protos.google.cloud.config.v1.Deployment|Deployment}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Field mask used to specify the fields to be overwritten in the - * Deployment resource by the update. - * - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @param {google.cloud.config.v1.Deployment} request.deployment - * Required. {@link protos.google.cloud.config.v1.Deployment|Deployment} to update. - * - * The deployment's `name` field is used to identify the resource to be - * updated. Format: - * `projects/{project}/locations/{location}/deployments/{deployment}` - * @param {string} [request.requestId] - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.update_deployment.js - * region_tag:config_v1_generated_Config_UpdateDeployment_async - */ - updateDeployment( - request?: protos.google.cloud.config.v1.IUpdateDeploymentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateDeployment( - request: protos.google.cloud.config.v1.IUpdateDeploymentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDeployment( - request: protos.google.cloud.config.v1.IUpdateDeploymentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDeployment( - request?: protos.google.cloud.config.v1.IUpdateDeploymentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'deployment.name': request.deployment!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateDeployment response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('updateDeployment request %j', request); - return this.innerApiCalls.updateDeployment(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateDeployment response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `updateDeployment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.update_deployment.js - * region_tag:config_v1_generated_Config_UpdateDeployment_async - */ - async checkUpdateDeploymentProgress(name: string): Promise>{ - this._log.info('updateDeployment long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateDeployment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a {@link protos.google.cloud.config.v1.Deployment|Deployment}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the Deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @param {string} [request.requestId] - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.force] - * Optional. If set to true, any revisions for this deployment will also be - * deleted. (Otherwise, the request will only work if the deployment has no - * revisions.) - * @param {google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy} [request.deletePolicy] - * Optional. Policy on how resources actuated by the deployment should be - * deleted. If unspecified, the default behavior is to delete the underlying - * resources. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.delete_deployment.js - * region_tag:config_v1_generated_Config_DeleteDeployment_async - */ - deleteDeployment( - request?: protos.google.cloud.config.v1.IDeleteDeploymentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteDeployment( - request: protos.google.cloud.config.v1.IDeleteDeploymentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDeployment( - request: protos.google.cloud.config.v1.IDeleteDeploymentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDeployment( - request?: protos.google.cloud.config.v1.IDeleteDeploymentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteDeployment response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteDeployment request %j', request); - return this.innerApiCalls.deleteDeployment(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteDeployment response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteDeployment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.delete_deployment.js - * region_tag:config_v1_generated_Config_DeleteDeployment_async - */ - async checkDeleteDeploymentProgress(name: string): Promise>{ - this._log.info('deleteDeployment long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteDeployment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Locks a deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.lock_deployment.js - * region_tag:config_v1_generated_Config_LockDeployment_async - */ - lockDeployment( - request?: protos.google.cloud.config.v1.ILockDeploymentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - lockDeployment( - request: protos.google.cloud.config.v1.ILockDeploymentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - lockDeployment( - request: protos.google.cloud.config.v1.ILockDeploymentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - lockDeployment( - request?: protos.google.cloud.config.v1.ILockDeploymentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('lockDeployment response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('lockDeployment request %j', request); - return this.innerApiCalls.lockDeployment(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('lockDeployment response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `lockDeployment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.lock_deployment.js - * region_tag:config_v1_generated_Config_LockDeployment_async - */ - async checkLockDeploymentProgress(name: string): Promise>{ - this._log.info('lockDeployment long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.lockDeployment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Unlocks a locked deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the deployment in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @param {number} request.lockId - * Required. Lock ID of the lock file to be unlocked. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.unlock_deployment.js - * region_tag:config_v1_generated_Config_UnlockDeployment_async - */ - unlockDeployment( - request?: protos.google.cloud.config.v1.IUnlockDeploymentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - unlockDeployment( - request: protos.google.cloud.config.v1.IUnlockDeploymentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - unlockDeployment( - request: protos.google.cloud.config.v1.IUnlockDeploymentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - unlockDeployment( - request?: protos.google.cloud.config.v1.IUnlockDeploymentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('unlockDeployment response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('unlockDeployment request %j', request); - return this.innerApiCalls.unlockDeployment(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('unlockDeployment response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `unlockDeployment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.unlock_deployment.js - * region_tag:config_v1_generated_Config_UnlockDeployment_async - */ - async checkUnlockDeploymentProgress(name: string): Promise>{ - this._log.info('unlockDeployment long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.unlockDeployment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a {@link protos.google.cloud.config.v1.Preview|Preview}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Preview is created. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - * @param {string} [request.previewId] - * Optional. The preview ID. - * @param {google.cloud.config.v1.Preview} request.preview - * Required. {@link protos.google.cloud.config.v1.Preview|Preview} resource to be created. - * @param {string} [request.requestId] - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.create_preview.js - * region_tag:config_v1_generated_Config_CreatePreview_async - */ - createPreview( - request?: protos.google.cloud.config.v1.ICreatePreviewRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createPreview( - request: protos.google.cloud.config.v1.ICreatePreviewRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createPreview( - request: protos.google.cloud.config.v1.ICreatePreviewRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createPreview( - request?: protos.google.cloud.config.v1.ICreatePreviewRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createPreview response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createPreview request %j', request); - return this.innerApiCalls.createPreview(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createPreview response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createPreview()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.create_preview.js - * region_tag:config_v1_generated_Config_CreatePreview_async - */ - async checkCreatePreviewProgress(name: string): Promise>{ - this._log.info('createPreview long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createPreview, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a {@link protos.google.cloud.config.v1.Preview|Preview}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the Preview in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * @param {string} [request.requestId] - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.delete_preview.js - * region_tag:config_v1_generated_Config_DeletePreview_async - */ - deletePreview( - request?: protos.google.cloud.config.v1.IDeletePreviewRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deletePreview( - request: protos.google.cloud.config.v1.IDeletePreviewRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deletePreview( - request: protos.google.cloud.config.v1.IDeletePreviewRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deletePreview( - request?: protos.google.cloud.config.v1.IDeletePreviewRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deletePreview response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deletePreview request %j', request); - return this.innerApiCalls.deletePreview(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deletePreview response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deletePreview()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.delete_preview.js - * region_tag:config_v1_generated_Config_DeletePreview_async - */ - async checkDeletePreviewProgress(name: string): Promise>{ - this._log.info('deletePreview long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deletePreview, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the AutoMigrationConfig for a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. The update mask applies to the resource. See - * {@link protos.google.protobuf.FieldMask|google.protobuf.FieldMask}. - * @param {google.cloud.config.v1.AutoMigrationConfig} request.autoMigrationConfig - * Required. The AutoMigrationConfig to update. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.update_auto_migration_config.js - * region_tag:config_v1_generated_Config_UpdateAutoMigrationConfig_async - */ - updateAutoMigrationConfig( - request?: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateAutoMigrationConfig( - request: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAutoMigrationConfig( - request: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAutoMigrationConfig( - request?: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'auto_migration_config.name': request.autoMigrationConfig!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateAutoMigrationConfig response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('updateAutoMigrationConfig request %j', request); - return this.innerApiCalls.updateAutoMigrationConfig(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateAutoMigrationConfig response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `updateAutoMigrationConfig()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.update_auto_migration_config.js - * region_tag:config_v1_generated_Config_UpdateAutoMigrationConfig_async - */ - async checkUpdateAutoMigrationConfigProgress(name: string): Promise>{ - this._log.info('updateAutoMigrationConfig long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateAutoMigrationConfig, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists {@link protos.google.cloud.config.v1.Deployment|Deployment}s in a given project - * and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Deployments are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - * @param {number} request.pageSize - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} request.pageToken - * Token returned by previous call to 'ListDeployments' which specifies the - * position in the list from where to continue listing the resources. - * @param {string} request.filter - * Lists the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.config.v1.Deployment|Deployment}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listDeploymentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listDeployments( - request?: protos.google.cloud.config.v1.IListDeploymentsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IDeployment[], - protos.google.cloud.config.v1.IListDeploymentsRequest|null, - protos.google.cloud.config.v1.IListDeploymentsResponse - ]>; - listDeployments( - request: protos.google.cloud.config.v1.IListDeploymentsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListDeploymentsRequest, - protos.google.cloud.config.v1.IListDeploymentsResponse|null|undefined, - protos.google.cloud.config.v1.IDeployment>): void; - listDeployments( - request: protos.google.cloud.config.v1.IListDeploymentsRequest, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListDeploymentsRequest, - protos.google.cloud.config.v1.IListDeploymentsResponse|null|undefined, - protos.google.cloud.config.v1.IDeployment>): void; - listDeployments( - request?: protos.google.cloud.config.v1.IListDeploymentsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.config.v1.IListDeploymentsRequest, - protos.google.cloud.config.v1.IListDeploymentsResponse|null|undefined, - protos.google.cloud.config.v1.IDeployment>, - callback?: PaginationCallback< - protos.google.cloud.config.v1.IListDeploymentsRequest, - protos.google.cloud.config.v1.IListDeploymentsResponse|null|undefined, - protos.google.cloud.config.v1.IDeployment>): - Promise<[ - protos.google.cloud.config.v1.IDeployment[], - protos.google.cloud.config.v1.IListDeploymentsRequest|null, - protos.google.cloud.config.v1.IListDeploymentsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.config.v1.IListDeploymentsRequest, - protos.google.cloud.config.v1.IListDeploymentsResponse|null|undefined, - protos.google.cloud.config.v1.IDeployment>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listDeployments values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listDeployments request %j', request); - return this.innerApiCalls - .listDeployments(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.config.v1.IDeployment[], - protos.google.cloud.config.v1.IListDeploymentsRequest|null, - protos.google.cloud.config.v1.IListDeploymentsResponse - ]) => { - this._log.info('listDeployments values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listDeployments`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Deployments are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - * @param {number} request.pageSize - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} request.pageToken - * Token returned by previous call to 'ListDeployments' which specifies the - * position in the list from where to continue listing the resources. - * @param {string} request.filter - * Lists the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.config.v1.Deployment|Deployment} 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 `listDeploymentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listDeploymentsStream( - request?: protos.google.cloud.config.v1.IListDeploymentsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listDeployments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listDeployments stream %j', request); - return this.descriptors.page.listDeployments.createStream( - this.innerApiCalls.listDeployments as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDeployments`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Deployments are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - * @param {number} request.pageSize - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} request.pageToken - * Token returned by previous call to 'ListDeployments' which specifies the - * position in the list from where to continue listing the resources. - * @param {string} request.filter - * Lists the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.config.v1.Deployment|Deployment}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.list_deployments.js - * region_tag:config_v1_generated_Config_ListDeployments_async - */ - listDeploymentsAsync( - request?: protos.google.cloud.config.v1.IListDeploymentsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listDeployments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listDeployments iterate %j', request); - return this.descriptors.page.listDeployments.asyncIterate( - this.innerApiCalls['listDeployments'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists {@link protos.google.cloud.config.v1.Revision|Revision}s of a deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Revisions are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @param {number} request.pageSize - * When requesting a page of resources, `page_size` specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} request.pageToken - * Token returned by previous call to 'ListRevisions' which specifies the - * position in the list from where to continue listing the resources. - * @param {string} request.filter - * Lists the Revisions that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar - * - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - * - Filter by state: - * - Revisions in CREATING state. - * state=CREATING - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.config.v1.Revision|Revision}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listRevisionsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRevisions( - request?: protos.google.cloud.config.v1.IListRevisionsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IRevision[], - protos.google.cloud.config.v1.IListRevisionsRequest|null, - protos.google.cloud.config.v1.IListRevisionsResponse - ]>; - listRevisions( - request: protos.google.cloud.config.v1.IListRevisionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListRevisionsRequest, - protos.google.cloud.config.v1.IListRevisionsResponse|null|undefined, - protos.google.cloud.config.v1.IRevision>): void; - listRevisions( - request: protos.google.cloud.config.v1.IListRevisionsRequest, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListRevisionsRequest, - protos.google.cloud.config.v1.IListRevisionsResponse|null|undefined, - protos.google.cloud.config.v1.IRevision>): void; - listRevisions( - request?: protos.google.cloud.config.v1.IListRevisionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.config.v1.IListRevisionsRequest, - protos.google.cloud.config.v1.IListRevisionsResponse|null|undefined, - protos.google.cloud.config.v1.IRevision>, - callback?: PaginationCallback< - protos.google.cloud.config.v1.IListRevisionsRequest, - protos.google.cloud.config.v1.IListRevisionsResponse|null|undefined, - protos.google.cloud.config.v1.IRevision>): - Promise<[ - protos.google.cloud.config.v1.IRevision[], - protos.google.cloud.config.v1.IListRevisionsRequest|null, - protos.google.cloud.config.v1.IListRevisionsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.config.v1.IListRevisionsRequest, - protos.google.cloud.config.v1.IListRevisionsResponse|null|undefined, - protos.google.cloud.config.v1.IRevision>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listRevisions values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listRevisions request %j', request); - return this.innerApiCalls - .listRevisions(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.config.v1.IRevision[], - protos.google.cloud.config.v1.IListRevisionsRequest|null, - protos.google.cloud.config.v1.IListRevisionsResponse - ]) => { - this._log.info('listRevisions values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listRevisions`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Revisions are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @param {number} request.pageSize - * When requesting a page of resources, `page_size` specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} request.pageToken - * Token returned by previous call to 'ListRevisions' which specifies the - * position in the list from where to continue listing the resources. - * @param {string} request.filter - * Lists the Revisions that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar - * - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - * - Filter by state: - * - Revisions in CREATING state. - * state=CREATING - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.config.v1.Revision|Revision} 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 `listRevisionsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRevisionsStream( - request?: protos.google.cloud.config.v1.IListRevisionsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRevisions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listRevisions stream %j', request); - return this.descriptors.page.listRevisions.createStream( - this.innerApiCalls.listRevisions as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listRevisions`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Revisions are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. - * @param {number} request.pageSize - * When requesting a page of resources, `page_size` specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} request.pageToken - * Token returned by previous call to 'ListRevisions' which specifies the - * position in the list from where to continue listing the resources. - * @param {string} request.filter - * Lists the Revisions that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar - * - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - * - Filter by state: - * - Revisions in CREATING state. - * state=CREATING - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.config.v1.Revision|Revision}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.list_revisions.js - * region_tag:config_v1_generated_Config_ListRevisions_async - */ - listRevisionsAsync( - request?: protos.google.cloud.config.v1.IListRevisionsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRevisions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listRevisions iterate %j', request); - return this.descriptors.page.listRevisions.asyncIterate( - this.innerApiCalls['listRevisions'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists {@link protos.google.cloud.config.v1.Resource|Resources} in a given revision. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Resources are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * @param {number} request.pageSize - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} request.pageToken - * Token returned by previous call to 'ListResources' which specifies the - * position in the list from where to continue listing the resources. - * @param {string} request.filter - * Lists the Resources that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.config.v1.Resource|Resource}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listResourcesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listResources( - request?: protos.google.cloud.config.v1.IListResourcesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IResource[], - protos.google.cloud.config.v1.IListResourcesRequest|null, - protos.google.cloud.config.v1.IListResourcesResponse - ]>; - listResources( - request: protos.google.cloud.config.v1.IListResourcesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListResourcesRequest, - protos.google.cloud.config.v1.IListResourcesResponse|null|undefined, - protos.google.cloud.config.v1.IResource>): void; - listResources( - request: protos.google.cloud.config.v1.IListResourcesRequest, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListResourcesRequest, - protos.google.cloud.config.v1.IListResourcesResponse|null|undefined, - protos.google.cloud.config.v1.IResource>): void; - listResources( - request?: protos.google.cloud.config.v1.IListResourcesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.config.v1.IListResourcesRequest, - protos.google.cloud.config.v1.IListResourcesResponse|null|undefined, - protos.google.cloud.config.v1.IResource>, - callback?: PaginationCallback< - protos.google.cloud.config.v1.IListResourcesRequest, - protos.google.cloud.config.v1.IListResourcesResponse|null|undefined, - protos.google.cloud.config.v1.IResource>): - Promise<[ - protos.google.cloud.config.v1.IResource[], - protos.google.cloud.config.v1.IListResourcesRequest|null, - protos.google.cloud.config.v1.IListResourcesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.config.v1.IListResourcesRequest, - protos.google.cloud.config.v1.IListResourcesResponse|null|undefined, - protos.google.cloud.config.v1.IResource>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listResources values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listResources request %j', request); - return this.innerApiCalls - .listResources(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.config.v1.IResource[], - protos.google.cloud.config.v1.IListResourcesRequest|null, - protos.google.cloud.config.v1.IListResourcesResponse - ]) => { - this._log.info('listResources values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listResources`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Resources are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * @param {number} request.pageSize - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} request.pageToken - * Token returned by previous call to 'ListResources' which specifies the - * position in the list from where to continue listing the resources. - * @param {string} request.filter - * Lists the Resources that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.config.v1.Resource|Resource} 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 `listResourcesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listResourcesStream( - request?: protos.google.cloud.config.v1.IListResourcesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listResources']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listResources stream %j', request); - return this.descriptors.page.listResources.createStream( - this.innerApiCalls.listResources as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listResources`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Resources are listed. The parent - * value is in the format: - * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. - * @param {number} request.pageSize - * When requesting a page of resources, 'page_size' specifies number of - * resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} request.pageToken - * Token returned by previous call to 'ListResources' which specifies the - * position in the list from where to continue listing the resources. - * @param {string} request.filter - * Lists the Resources that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.config.v1.Resource|Resource}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.list_resources.js - * region_tag:config_v1_generated_Config_ListResources_async - */ - listResourcesAsync( - request?: protos.google.cloud.config.v1.IListResourcesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listResources']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listResources iterate %j', request); - return this.descriptors.page.listResources.asyncIterate( - this.innerApiCalls['listResources'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists {@link protos.google.cloud.config.v1.Preview|Preview}s in a given project and - * location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Previews are listed. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListDeployments' which - * specifies the position in the list from where to continue listing the - * resources. - * @param {string} [request.filter] - * Optional. Lists the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.config.v1.Preview|Preview}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listPreviewsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listPreviews( - request?: protos.google.cloud.config.v1.IListPreviewsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IPreview[], - protos.google.cloud.config.v1.IListPreviewsRequest|null, - protos.google.cloud.config.v1.IListPreviewsResponse - ]>; - listPreviews( - request: protos.google.cloud.config.v1.IListPreviewsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListPreviewsRequest, - protos.google.cloud.config.v1.IListPreviewsResponse|null|undefined, - protos.google.cloud.config.v1.IPreview>): void; - listPreviews( - request: protos.google.cloud.config.v1.IListPreviewsRequest, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListPreviewsRequest, - protos.google.cloud.config.v1.IListPreviewsResponse|null|undefined, - protos.google.cloud.config.v1.IPreview>): void; - listPreviews( - request?: protos.google.cloud.config.v1.IListPreviewsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.config.v1.IListPreviewsRequest, - protos.google.cloud.config.v1.IListPreviewsResponse|null|undefined, - protos.google.cloud.config.v1.IPreview>, - callback?: PaginationCallback< - protos.google.cloud.config.v1.IListPreviewsRequest, - protos.google.cloud.config.v1.IListPreviewsResponse|null|undefined, - protos.google.cloud.config.v1.IPreview>): - Promise<[ - protos.google.cloud.config.v1.IPreview[], - protos.google.cloud.config.v1.IListPreviewsRequest|null, - protos.google.cloud.config.v1.IListPreviewsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.config.v1.IListPreviewsRequest, - protos.google.cloud.config.v1.IListPreviewsResponse|null|undefined, - protos.google.cloud.config.v1.IPreview>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listPreviews values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listPreviews request %j', request); - return this.innerApiCalls - .listPreviews(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.config.v1.IPreview[], - protos.google.cloud.config.v1.IListPreviewsRequest|null, - protos.google.cloud.config.v1.IListPreviewsResponse - ]) => { - this._log.info('listPreviews values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listPreviews`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Previews are listed. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListDeployments' which - * specifies the position in the list from where to continue listing the - * resources. - * @param {string} [request.filter] - * Optional. Lists the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.config.v1.Preview|Preview} 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 `listPreviewsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listPreviewsStream( - request?: protos.google.cloud.config.v1.IListPreviewsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listPreviews']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listPreviews stream %j', request); - return this.descriptors.page.listPreviews.createStream( - this.innerApiCalls.listPreviews as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listPreviews`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the Previews are listed. The parent - * value is in the format: 'projects/{project_id}/locations/{location}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListDeployments' which - * specifies the position in the list from where to continue listing the - * resources. - * @param {string} [request.filter] - * Optional. Lists the Deployments that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form '{field} {operator} {value}' where operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/foo/locations/us-central1/deployments/bar - * - * - Filter by labels: - * - Resources that have a key called 'foo' - * labels.foo:* - * - Resources that have a key called 'foo' whose value is 'bar' - * labels.foo = bar - * - * - Filter by state: - * - Deployments in CREATING state. - * state=CREATING - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.config.v1.Preview|Preview}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.list_previews.js - * region_tag:config_v1_generated_Config_ListPreviews_async - */ - listPreviewsAsync( - request?: protos.google.cloud.config.v1.IListPreviewsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listPreviews']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listPreviews iterate %j', request); - return this.descriptors.page.listPreviews.asyncIterate( - this.innerApiCalls['listPreviews'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion}s in a - * given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the TerraformVersions are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of terraform versions, 'page_size' - * specifies number of terraform versions to return. If unspecified, at most - * 500 will be returned. The maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListTerraformVersions' which - * specifies the position in the list from where to continue listing the - * terraform versions. - * @param {string} [request.filter] - * Optional. Lists the TerraformVersions that match the filter expression. A - * filter expression filters the resources listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listTerraformVersionsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listTerraformVersions( - request?: protos.google.cloud.config.v1.IListTerraformVersionsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.ITerraformVersion[], - protos.google.cloud.config.v1.IListTerraformVersionsRequest|null, - protos.google.cloud.config.v1.IListTerraformVersionsResponse - ]>; - listTerraformVersions( - request: protos.google.cloud.config.v1.IListTerraformVersionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListTerraformVersionsRequest, - protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined, - protos.google.cloud.config.v1.ITerraformVersion>): void; - listTerraformVersions( - request: protos.google.cloud.config.v1.IListTerraformVersionsRequest, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListTerraformVersionsRequest, - protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined, - protos.google.cloud.config.v1.ITerraformVersion>): void; - listTerraformVersions( - request?: protos.google.cloud.config.v1.IListTerraformVersionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.config.v1.IListTerraformVersionsRequest, - protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined, - protos.google.cloud.config.v1.ITerraformVersion>, - callback?: PaginationCallback< - protos.google.cloud.config.v1.IListTerraformVersionsRequest, - protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined, - protos.google.cloud.config.v1.ITerraformVersion>): - Promise<[ - protos.google.cloud.config.v1.ITerraformVersion[], - protos.google.cloud.config.v1.IListTerraformVersionsRequest|null, - protos.google.cloud.config.v1.IListTerraformVersionsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.config.v1.IListTerraformVersionsRequest, - protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined, - protos.google.cloud.config.v1.ITerraformVersion>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listTerraformVersions values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listTerraformVersions request %j', request); - return this.innerApiCalls - .listTerraformVersions(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.config.v1.ITerraformVersion[], - protos.google.cloud.config.v1.IListTerraformVersionsRequest|null, - protos.google.cloud.config.v1.IListTerraformVersionsResponse - ]) => { - this._log.info('listTerraformVersions values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listTerraformVersions`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the TerraformVersions are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of terraform versions, 'page_size' - * specifies number of terraform versions to return. If unspecified, at most - * 500 will be returned. The maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListTerraformVersions' which - * specifies the position in the list from where to continue listing the - * terraform versions. - * @param {string} [request.filter] - * Optional. Lists the TerraformVersions that match the filter expression. A - * filter expression filters the resources listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion} 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 `listTerraformVersionsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listTerraformVersionsStream( - request?: protos.google.cloud.config.v1.IListTerraformVersionsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listTerraformVersions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listTerraformVersions stream %j', request); - return this.descriptors.page.listTerraformVersions.createStream( - this.innerApiCalls.listTerraformVersions as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listTerraformVersions`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the TerraformVersions are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of terraform versions, 'page_size' - * specifies number of terraform versions to return. If unspecified, at most - * 500 will be returned. The maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListTerraformVersions' which - * specifies the position in the list from where to continue listing the - * terraform versions. - * @param {string} [request.filter] - * Optional. Lists the TerraformVersions that match the filter expression. A - * filter expression filters the resources listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS - * operator which is roughly synonymous with equality). {field} can refer to a - * proto or JSON field, or a synthetic field. Field names can be camelCase or - * snake_case. - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.config.v1.TerraformVersion|TerraformVersion}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.list_terraform_versions.js - * region_tag:config_v1_generated_Config_ListTerraformVersions_async - */ - listTerraformVersionsAsync( - request?: protos.google.cloud.config.v1.IListTerraformVersionsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listTerraformVersions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listTerraformVersions iterate %j', request); - return this.descriptors.page.listTerraformVersions.asyncIterate( - this.innerApiCalls['listTerraformVersions'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists ResourceChanges for a given preview. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the ResourceChanges are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of resource changes, 'page_size' specifies - * number of resource changes to return. If unspecified, at most 500 will be - * returned. The maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListResourceChanges' which - * specifies the position in the list from where to continue listing the - * resource changes. - * @param {string} [request.filter] - * Optional. Lists the resource changes that match the filter expression. A - * filter expression filters the resource changes listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.config.v1.ResourceChange|ResourceChange}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listResourceChangesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listResourceChanges( - request?: protos.google.cloud.config.v1.IListResourceChangesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IResourceChange[], - protos.google.cloud.config.v1.IListResourceChangesRequest|null, - protos.google.cloud.config.v1.IListResourceChangesResponse - ]>; - listResourceChanges( - request: protos.google.cloud.config.v1.IListResourceChangesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListResourceChangesRequest, - protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, - protos.google.cloud.config.v1.IResourceChange>): void; - listResourceChanges( - request: protos.google.cloud.config.v1.IListResourceChangesRequest, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListResourceChangesRequest, - protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, - protos.google.cloud.config.v1.IResourceChange>): void; - listResourceChanges( - request?: protos.google.cloud.config.v1.IListResourceChangesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.config.v1.IListResourceChangesRequest, - protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, - protos.google.cloud.config.v1.IResourceChange>, - callback?: PaginationCallback< - protos.google.cloud.config.v1.IListResourceChangesRequest, - protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, - protos.google.cloud.config.v1.IResourceChange>): - Promise<[ - protos.google.cloud.config.v1.IResourceChange[], - protos.google.cloud.config.v1.IListResourceChangesRequest|null, - protos.google.cloud.config.v1.IListResourceChangesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.config.v1.IListResourceChangesRequest, - protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, - protos.google.cloud.config.v1.IResourceChange>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listResourceChanges values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listResourceChanges request %j', request); - return this.innerApiCalls - .listResourceChanges(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.config.v1.IResourceChange[], - protos.google.cloud.config.v1.IListResourceChangesRequest|null, - protos.google.cloud.config.v1.IListResourceChangesResponse - ]) => { - this._log.info('listResourceChanges values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listResourceChanges`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the ResourceChanges are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of resource changes, 'page_size' specifies - * number of resource changes to return. If unspecified, at most 500 will be - * returned. The maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListResourceChanges' which - * specifies the position in the list from where to continue listing the - * resource changes. - * @param {string} [request.filter] - * Optional. Lists the resource changes that match the filter expression. A - * filter expression filters the resource changes listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.config.v1.ResourceChange|ResourceChange} 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 `listResourceChangesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listResourceChangesStream( - request?: protos.google.cloud.config.v1.IListResourceChangesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listResourceChanges']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listResourceChanges stream %j', request); - return this.descriptors.page.listResourceChanges.createStream( - this.innerApiCalls.listResourceChanges as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listResourceChanges`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the ResourceChanges are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of resource changes, 'page_size' specifies - * number of resource changes to return. If unspecified, at most 500 will be - * returned. The maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListResourceChanges' which - * specifies the position in the list from where to continue listing the - * resource changes. - * @param {string} [request.filter] - * Optional. Lists the resource changes that match the filter expression. A - * filter expression filters the resource changes listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.config.v1.ResourceChange|ResourceChange}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.list_resource_changes.js - * region_tag:config_v1_generated_Config_ListResourceChanges_async - */ - listResourceChangesAsync( - request?: protos.google.cloud.config.v1.IListResourceChangesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listResourceChanges']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listResourceChanges iterate %j', request); - return this.descriptors.page.listResourceChanges.asyncIterate( - this.innerApiCalls['listResourceChanges'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * List ResourceDrifts for a given preview. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the ResourceDrifts are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of resource drifts, 'page_size' specifies - * number of resource drifts to return. If unspecified, at most 500 will be - * returned. The maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListResourceDrifts' which - * specifies the position in the list from where to continue listing the - * resource drifts. - * @param {string} [request.filter] - * Optional. Lists the resource drifts that match the filter expression. A - * filter expression filters the resource drifts listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.config.v1.ResourceDrift|ResourceDrift}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listResourceDriftsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listResourceDrifts( - request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.config.v1.IResourceDrift[], - protos.google.cloud.config.v1.IListResourceDriftsRequest|null, - protos.google.cloud.config.v1.IListResourceDriftsResponse - ]>; - listResourceDrifts( - request: protos.google.cloud.config.v1.IListResourceDriftsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListResourceDriftsRequest, - protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, - protos.google.cloud.config.v1.IResourceDrift>): void; - listResourceDrifts( - request: protos.google.cloud.config.v1.IListResourceDriftsRequest, - callback: PaginationCallback< - protos.google.cloud.config.v1.IListResourceDriftsRequest, - protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, - protos.google.cloud.config.v1.IResourceDrift>): void; - listResourceDrifts( - request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.config.v1.IListResourceDriftsRequest, - protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, - protos.google.cloud.config.v1.IResourceDrift>, - callback?: PaginationCallback< - protos.google.cloud.config.v1.IListResourceDriftsRequest, - protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, - protos.google.cloud.config.v1.IResourceDrift>): - Promise<[ - protos.google.cloud.config.v1.IResourceDrift[], - protos.google.cloud.config.v1.IListResourceDriftsRequest|null, - protos.google.cloud.config.v1.IListResourceDriftsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.config.v1.IListResourceDriftsRequest, - protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, - protos.google.cloud.config.v1.IResourceDrift>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listResourceDrifts values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listResourceDrifts request %j', request); - return this.innerApiCalls - .listResourceDrifts(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.config.v1.IResourceDrift[], - protos.google.cloud.config.v1.IListResourceDriftsRequest|null, - protos.google.cloud.config.v1.IListResourceDriftsResponse - ]) => { - this._log.info('listResourceDrifts values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listResourceDrifts`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the ResourceDrifts are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of resource drifts, 'page_size' specifies - * number of resource drifts to return. If unspecified, at most 500 will be - * returned. The maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListResourceDrifts' which - * specifies the position in the list from where to continue listing the - * resource drifts. - * @param {string} [request.filter] - * Optional. Lists the resource drifts that match the filter expression. A - * filter expression filters the resource drifts listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.config.v1.ResourceDrift|ResourceDrift} 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 `listResourceDriftsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listResourceDriftsStream( - request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listResourceDrifts']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listResourceDrifts stream %j', request); - return this.descriptors.page.listResourceDrifts.createStream( - this.innerApiCalls.listResourceDrifts as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listResourceDrifts`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent in whose context the ResourceDrifts are listed. The - * parent value is in the format: - * 'projects/{project_id}/locations/{location}/previews/{preview}'. - * @param {number} [request.pageSize] - * Optional. When requesting a page of resource drifts, 'page_size' specifies - * number of resource drifts to return. If unspecified, at most 500 will be - * returned. The maximum value is 1000. - * @param {string} [request.pageToken] - * Optional. Token returned by previous call to 'ListResourceDrifts' which - * specifies the position in the list from where to continue listing the - * resource drifts. - * @param {string} [request.filter] - * Optional. Lists the resource drifts that match the filter expression. A - * filter expression filters the resource drifts listed in the response. The - * expression must be of the form '{field} {operator} {value}' where - * operators: '<', '>', - * '<=', - * '>=', - * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is - * roughly synonymous with equality). {field} can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = - * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.config.v1.ResourceDrift|ResourceDrift}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.list_resource_drifts.js - * region_tag:config_v1_generated_Config_ListResourceDrifts_async - */ - listResourceDriftsAsync( - request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listResourceDrifts']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listResourceDrifts iterate %j', request); - return this.descriptors.page.listResourceDrifts.asyncIterate( - this.innerApiCalls['listResourceDrifts'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets the access control policy for a resource. Returns an empty policy - * if the resource exists and does not have a policy set. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {Object} [request.options] - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - getIamPolicy( - request: IamProtos.google.iam.v1.GetIamPolicyRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ):Promise<[IamProtos.google.iam.v1.Policy]> { - return this.iamClient.getIamPolicy(request, options, callback); - } - -/** - * Returns permissions that a caller has on the specified resource. If the - * resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Note: This operation is designed to be used for building - * permission-aware UIs and command-line tools, not for authorization - * checking. This operation may "fail open" without warning. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - setIamPolicy( - request: IamProtos.google.iam.v1.SetIamPolicyRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ):Promise<[IamProtos.google.iam.v1.Policy]> { - return this.iamClient.setIamPolicy(request, options, callback); - } - -/** - * Returns permissions that a caller has on the specified resource. If the - * resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Note: This operation is designed to be used for building - * permission-aware UIs and command-line tools, not for authorization - * checking. This operation may "fail open" without warning. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - */ - testIamPermissions( - request: IamProtos.google.iam.v1.TestIamPermissionsRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.TestIamPermissionsResponse, - IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.TestIamPermissionsResponse, - IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ):Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { - return this.iamClient.testIamPermissions(request, options, callback); - } - -/** - * Gets information about a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Resource name for the location. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLocation(request); - * ``` - */ - getLocation( - request: LocationProtos.google.cloud.location.IGetLocationRequest, - options?: - | gax.CallOptions - | Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - > - ): Promise { - return this.locationsClient.getLocation(request, options, callback); - } - -/** - * Lists information about the supported locations for this service. Returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource that owns the locations collection, if applicable. - * @param {string} request.filter - * The standard list filter. - * @param {number} request.pageSize - * The standard list page size. - * @param {string} request.pageToken - * The standard list page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example - * ``` - * const iterable = client.listLocationsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` - */ - listLocationsAsync( - request: LocationProtos.google.cloud.location.IListLocationsRequest, - options?: CallOptions - ): AsyncIterable { - return this.locationsClient.listLocationsAsync(request, options); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - 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'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - 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'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - 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'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified autoMigrationConfig resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - autoMigrationConfigPath(project:string,location:string) { - return this.pathTemplates.autoMigrationConfigPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from AutoMigrationConfig resource. - * - * @param {string} autoMigrationConfigName - * A fully-qualified path representing AutoMigrationConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAutoMigrationConfigName(autoMigrationConfigName: string) { - return this.pathTemplates.autoMigrationConfigPathTemplate.match(autoMigrationConfigName).project; - } - - /** - * Parse the location from AutoMigrationConfig resource. - * - * @param {string} autoMigrationConfigName - * A fully-qualified path representing AutoMigrationConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAutoMigrationConfigName(autoMigrationConfigName: string) { - return this.pathTemplates.autoMigrationConfigPathTemplate.match(autoMigrationConfigName).location; - } - - /** - * Return a fully-qualified deployment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} deployment - * @returns {string} Resource name string. - */ - deploymentPath(project:string,location:string,deployment:string) { - return this.pathTemplates.deploymentPathTemplate.render({ - project: project, - location: location, - deployment: deployment, - }); - } - - /** - * Parse the project from Deployment resource. - * - * @param {string} deploymentName - * A fully-qualified path representing Deployment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDeploymentName(deploymentName: string) { - return this.pathTemplates.deploymentPathTemplate.match(deploymentName).project; - } - - /** - * Parse the location from Deployment resource. - * - * @param {string} deploymentName - * A fully-qualified path representing Deployment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDeploymentName(deploymentName: string) { - return this.pathTemplates.deploymentPathTemplate.match(deploymentName).location; - } - - /** - * Parse the deployment from Deployment resource. - * - * @param {string} deploymentName - * A fully-qualified path representing Deployment resource. - * @returns {string} A string representing the deployment. - */ - matchDeploymentFromDeploymentName(deploymentName: string) { - return this.pathTemplates.deploymentPathTemplate.match(deploymentName).deployment; - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project:string,location:string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified preview resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} preview - * @returns {string} Resource name string. - */ - previewPath(project:string,location:string,preview:string) { - return this.pathTemplates.previewPathTemplate.render({ - project: project, - location: location, - preview: preview, - }); - } - - /** - * Parse the project from Preview resource. - * - * @param {string} previewName - * A fully-qualified path representing Preview resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPreviewName(previewName: string) { - return this.pathTemplates.previewPathTemplate.match(previewName).project; - } - - /** - * Parse the location from Preview resource. - * - * @param {string} previewName - * A fully-qualified path representing Preview resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPreviewName(previewName: string) { - return this.pathTemplates.previewPathTemplate.match(previewName).location; - } - - /** - * Parse the preview from Preview resource. - * - * @param {string} previewName - * A fully-qualified path representing Preview resource. - * @returns {string} A string representing the preview. - */ - matchPreviewFromPreviewName(previewName: string) { - return this.pathTemplates.previewPathTemplate.match(previewName).preview; - } - - /** - * Return a fully-qualified resource resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} deployment - * @param {string} revision - * @param {string} resource - * @returns {string} Resource name string. - */ - resourcePath(project:string,location:string,deployment:string,revision:string,resource:string) { - return this.pathTemplates.resourcePathTemplate.render({ - project: project, - location: location, - deployment: deployment, - revision: revision, - resource: resource, - }); - } - - /** - * Parse the project from Resource resource. - * - * @param {string} resourceName - * A fully-qualified path representing Resource resource. - * @returns {string} A string representing the project. - */ - matchProjectFromResourceName(resourceName: string) { - return this.pathTemplates.resourcePathTemplate.match(resourceName).project; - } - - /** - * Parse the location from Resource resource. - * - * @param {string} resourceName - * A fully-qualified path representing Resource resource. - * @returns {string} A string representing the location. - */ - matchLocationFromResourceName(resourceName: string) { - return this.pathTemplates.resourcePathTemplate.match(resourceName).location; - } - - /** - * Parse the deployment from Resource resource. - * - * @param {string} resourceName - * A fully-qualified path representing Resource resource. - * @returns {string} A string representing the deployment. - */ - matchDeploymentFromResourceName(resourceName: string) { - return this.pathTemplates.resourcePathTemplate.match(resourceName).deployment; - } - - /** - * Parse the revision from Resource resource. - * - * @param {string} resourceName - * A fully-qualified path representing Resource resource. - * @returns {string} A string representing the revision. - */ - matchRevisionFromResourceName(resourceName: string) { - return this.pathTemplates.resourcePathTemplate.match(resourceName).revision; - } - - /** - * Parse the resource from Resource resource. - * - * @param {string} resourceName - * A fully-qualified path representing Resource resource. - * @returns {string} A string representing the resource. - */ - matchResourceFromResourceName(resourceName: string) { - return this.pathTemplates.resourcePathTemplate.match(resourceName).resource; - } - - /** - * Return a fully-qualified resourceChange resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} preview - * @param {string} resource_change - * @returns {string} Resource name string. - */ - resourceChangePath(project:string,location:string,preview:string,resourceChange:string) { - return this.pathTemplates.resourceChangePathTemplate.render({ - project: project, - location: location, - preview: preview, - resource_change: resourceChange, - }); - } - - /** - * Parse the project from ResourceChange resource. - * - * @param {string} resourceChangeName - * A fully-qualified path representing ResourceChange resource. - * @returns {string} A string representing the project. - */ - matchProjectFromResourceChangeName(resourceChangeName: string) { - return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).project; - } - - /** - * Parse the location from ResourceChange resource. - * - * @param {string} resourceChangeName - * A fully-qualified path representing ResourceChange resource. - * @returns {string} A string representing the location. - */ - matchLocationFromResourceChangeName(resourceChangeName: string) { - return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).location; - } - - /** - * Parse the preview from ResourceChange resource. - * - * @param {string} resourceChangeName - * A fully-qualified path representing ResourceChange resource. - * @returns {string} A string representing the preview. - */ - matchPreviewFromResourceChangeName(resourceChangeName: string) { - return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).preview; - } - - /** - * Parse the resource_change from ResourceChange resource. - * - * @param {string} resourceChangeName - * A fully-qualified path representing ResourceChange resource. - * @returns {string} A string representing the resource_change. - */ - matchResourceChangeFromResourceChangeName(resourceChangeName: string) { - return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).resource_change; - } - - /** - * Return a fully-qualified resourceDrift resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} preview - * @param {string} resource_drift - * @returns {string} Resource name string. - */ - resourceDriftPath(project:string,location:string,preview:string,resourceDrift:string) { - return this.pathTemplates.resourceDriftPathTemplate.render({ - project: project, - location: location, - preview: preview, - resource_drift: resourceDrift, - }); - } - - /** - * Parse the project from ResourceDrift resource. - * - * @param {string} resourceDriftName - * A fully-qualified path representing ResourceDrift resource. - * @returns {string} A string representing the project. - */ - matchProjectFromResourceDriftName(resourceDriftName: string) { - return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).project; - } - - /** - * Parse the location from ResourceDrift resource. - * - * @param {string} resourceDriftName - * A fully-qualified path representing ResourceDrift resource. - * @returns {string} A string representing the location. - */ - matchLocationFromResourceDriftName(resourceDriftName: string) { - return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).location; - } - - /** - * Parse the preview from ResourceDrift resource. - * - * @param {string} resourceDriftName - * A fully-qualified path representing ResourceDrift resource. - * @returns {string} A string representing the preview. - */ - matchPreviewFromResourceDriftName(resourceDriftName: string) { - return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).preview; - } - - /** - * Parse the resource_drift from ResourceDrift resource. - * - * @param {string} resourceDriftName - * A fully-qualified path representing ResourceDrift resource. - * @returns {string} A string representing the resource_drift. - */ - matchResourceDriftFromResourceDriftName(resourceDriftName: string) { - return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).resource_drift; - } - - /** - * Return a fully-qualified revision resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} deployment - * @param {string} revision - * @returns {string} Resource name string. - */ - revisionPath(project:string,location:string,deployment:string,revision:string) { - return this.pathTemplates.revisionPathTemplate.render({ - project: project, - location: location, - deployment: deployment, - revision: revision, - }); - } - - /** - * Parse the project from Revision resource. - * - * @param {string} revisionName - * A fully-qualified path representing Revision resource. - * @returns {string} A string representing the project. - */ - matchProjectFromRevisionName(revisionName: string) { - return this.pathTemplates.revisionPathTemplate.match(revisionName).project; - } - - /** - * Parse the location from Revision resource. - * - * @param {string} revisionName - * A fully-qualified path representing Revision resource. - * @returns {string} A string representing the location. - */ - matchLocationFromRevisionName(revisionName: string) { - return this.pathTemplates.revisionPathTemplate.match(revisionName).location; - } - - /** - * Parse the deployment from Revision resource. - * - * @param {string} revisionName - * A fully-qualified path representing Revision resource. - * @returns {string} A string representing the deployment. - */ - matchDeploymentFromRevisionName(revisionName: string) { - return this.pathTemplates.revisionPathTemplate.match(revisionName).deployment; - } - - /** - * Parse the revision from Revision resource. - * - * @param {string} revisionName - * A fully-qualified path representing Revision resource. - * @returns {string} A string representing the revision. - */ - matchRevisionFromRevisionName(revisionName: string) { - return this.pathTemplates.revisionPathTemplate.match(revisionName).revision; - } - - /** - * Return a fully-qualified serviceAccount resource name string. - * - * @param {string} project - * @param {string} service_account - * @returns {string} Resource name string. - */ - serviceAccountPath(project:string,serviceAccount:string) { - return this.pathTemplates.serviceAccountPathTemplate.render({ - project: project, - service_account: serviceAccount, - }); - } - - /** - * Parse the project from ServiceAccount resource. - * - * @param {string} serviceAccountName - * A fully-qualified path representing ServiceAccount resource. - * @returns {string} A string representing the project. - */ - matchProjectFromServiceAccountName(serviceAccountName: string) { - return this.pathTemplates.serviceAccountPathTemplate.match(serviceAccountName).project; - } - - /** - * Parse the service_account from ServiceAccount resource. - * - * @param {string} serviceAccountName - * A fully-qualified path representing ServiceAccount resource. - * @returns {string} A string representing the service_account. - */ - matchServiceAccountFromServiceAccountName(serviceAccountName: string) { - return this.pathTemplates.serviceAccountPathTemplate.match(serviceAccountName).service_account; - } - - /** - * Return a fully-qualified terraformVersion resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} terraform_version - * @returns {string} Resource name string. - */ - terraformVersionPath(project:string,location:string,terraformVersion:string) { - return this.pathTemplates.terraformVersionPathTemplate.render({ - project: project, - location: location, - terraform_version: terraformVersion, - }); - } - - /** - * Parse the project from TerraformVersion resource. - * - * @param {string} terraformVersionName - * A fully-qualified path representing TerraformVersion resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTerraformVersionName(terraformVersionName: string) { - return this.pathTemplates.terraformVersionPathTemplate.match(terraformVersionName).project; - } - - /** - * Parse the location from TerraformVersion resource. - * - * @param {string} terraformVersionName - * A fully-qualified path representing TerraformVersion resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTerraformVersionName(terraformVersionName: string) { - return this.pathTemplates.terraformVersionPathTemplate.match(terraformVersionName).location; - } - - /** - * Parse the terraform_version from TerraformVersion resource. - * - * @param {string} terraformVersionName - * A fully-qualified path representing TerraformVersion resource. - * @returns {string} A string representing the terraform_version. - */ - matchTerraformVersionFromTerraformVersionName(terraformVersionName: string) { - return this.pathTemplates.terraformVersionPathTemplate.match(terraformVersionName).terraform_version; - } - - /** - * Return a fully-qualified workerPool resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} worker_pool - * @returns {string} Resource name string. - */ - workerPoolPath(project:string,location:string,workerPool:string) { - return this.pathTemplates.workerPoolPathTemplate.render({ - project: project, - location: location, - worker_pool: workerPool, - }); - } - - /** - * Parse the project from WorkerPool resource. - * - * @param {string} workerPoolName - * A fully-qualified path representing WorkerPool resource. - * @returns {string} A string representing the project. - */ - matchProjectFromWorkerPoolName(workerPoolName: string) { - return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName).project; - } - - /** - * Parse the location from WorkerPool resource. - * - * @param {string} workerPoolName - * A fully-qualified path representing WorkerPool resource. - * @returns {string} A string representing the location. - */ - matchLocationFromWorkerPoolName(workerPoolName: string) { - return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName).location; - } - - /** - * Parse the worker_pool from WorkerPool resource. - * - * @param {string} workerPoolName - * A fully-qualified path representing WorkerPool resource. - * @returns {string} A string representing the worker_pool. - */ - matchWorkerPoolFromWorkerPoolName(workerPoolName: string) { - return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName).worker_pool; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.configStub && !this._terminated) { - return this.configStub.then(stub => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - this.iamClient.close().catch(err => {throw err}); - this.locationsClient.close().catch(err => {throw err}); - void this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-config/src/v1/config_client_config.json b/owl-bot-staging/google-cloud-config/src/v1/config_client_config.json deleted file mode 100644 index 5ea0334b5ba..00000000000 --- a/owl-bot-staging/google-cloud-config/src/v1/config_client_config.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "interfaces": { - "google.cloud.config.v1.Config": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListDeployments": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListRevisions": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetRevision": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetResource": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListResources": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ExportDeploymentStatefile": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ExportRevisionStatefile": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ImportStatefile": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteStatefile": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "LockDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UnlockDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ExportLockInfo": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreatePreview": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetPreview": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListPreviews": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeletePreview": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ExportPreviewResult": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListTerraformVersions": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetTerraformVersion": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListResourceChanges": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetResourceChange": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListResourceDrifts": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetResourceDrift": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetAutoMigrationConfig": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateAutoMigrationConfig": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-config/src/v1/config_proto_list.json b/owl-bot-staging/google-cloud-config/src/v1/config_proto_list.json deleted file mode 100644 index 7abf815f907..00000000000 --- a/owl-bot-staging/google-cloud-config/src/v1/config_proto_list.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "../../protos/google/cloud/config/v1/config.proto" -] diff --git a/owl-bot-staging/google-cloud-config/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-config/src/v1/gapic_metadata.json deleted file mode 100644 index 171a745b9e1..00000000000 --- a/owl-bot-staging/google-cloud-config/src/v1/gapic_metadata.json +++ /dev/null @@ -1,341 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.config.v1", - "libraryPackage": "@google-cloud/config", - "services": { - "Config": { - "clients": { - "grpc": { - "libraryClient": "ConfigClient", - "rpcs": { - "GetDeployment": { - "methods": [ - "getDeployment" - ] - }, - "GetRevision": { - "methods": [ - "getRevision" - ] - }, - "GetResource": { - "methods": [ - "getResource" - ] - }, - "ExportDeploymentStatefile": { - "methods": [ - "exportDeploymentStatefile" - ] - }, - "ExportRevisionStatefile": { - "methods": [ - "exportRevisionStatefile" - ] - }, - "ImportStatefile": { - "methods": [ - "importStatefile" - ] - }, - "DeleteStatefile": { - "methods": [ - "deleteStatefile" - ] - }, - "ExportLockInfo": { - "methods": [ - "exportLockInfo" - ] - }, - "GetPreview": { - "methods": [ - "getPreview" - ] - }, - "ExportPreviewResult": { - "methods": [ - "exportPreviewResult" - ] - }, - "GetTerraformVersion": { - "methods": [ - "getTerraformVersion" - ] - }, - "GetResourceChange": { - "methods": [ - "getResourceChange" - ] - }, - "GetResourceDrift": { - "methods": [ - "getResourceDrift" - ] - }, - "GetAutoMigrationConfig": { - "methods": [ - "getAutoMigrationConfig" - ] - }, - "CreateDeployment": { - "methods": [ - "createDeployment" - ] - }, - "UpdateDeployment": { - "methods": [ - "updateDeployment" - ] - }, - "DeleteDeployment": { - "methods": [ - "deleteDeployment" - ] - }, - "LockDeployment": { - "methods": [ - "lockDeployment" - ] - }, - "UnlockDeployment": { - "methods": [ - "unlockDeployment" - ] - }, - "CreatePreview": { - "methods": [ - "createPreview" - ] - }, - "DeletePreview": { - "methods": [ - "deletePreview" - ] - }, - "UpdateAutoMigrationConfig": { - "methods": [ - "updateAutoMigrationConfig" - ] - }, - "ListDeployments": { - "methods": [ - "listDeployments", - "listDeploymentsStream", - "listDeploymentsAsync" - ] - }, - "ListRevisions": { - "methods": [ - "listRevisions", - "listRevisionsStream", - "listRevisionsAsync" - ] - }, - "ListResources": { - "methods": [ - "listResources", - "listResourcesStream", - "listResourcesAsync" - ] - }, - "ListPreviews": { - "methods": [ - "listPreviews", - "listPreviewsStream", - "listPreviewsAsync" - ] - }, - "ListTerraformVersions": { - "methods": [ - "listTerraformVersions", - "listTerraformVersionsStream", - "listTerraformVersionsAsync" - ] - }, - "ListResourceChanges": { - "methods": [ - "listResourceChanges", - "listResourceChangesStream", - "listResourceChangesAsync" - ] - }, - "ListResourceDrifts": { - "methods": [ - "listResourceDrifts", - "listResourceDriftsStream", - "listResourceDriftsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ConfigClient", - "rpcs": { - "GetDeployment": { - "methods": [ - "getDeployment" - ] - }, - "GetRevision": { - "methods": [ - "getRevision" - ] - }, - "GetResource": { - "methods": [ - "getResource" - ] - }, - "ExportDeploymentStatefile": { - "methods": [ - "exportDeploymentStatefile" - ] - }, - "ExportRevisionStatefile": { - "methods": [ - "exportRevisionStatefile" - ] - }, - "ImportStatefile": { - "methods": [ - "importStatefile" - ] - }, - "DeleteStatefile": { - "methods": [ - "deleteStatefile" - ] - }, - "ExportLockInfo": { - "methods": [ - "exportLockInfo" - ] - }, - "GetPreview": { - "methods": [ - "getPreview" - ] - }, - "ExportPreviewResult": { - "methods": [ - "exportPreviewResult" - ] - }, - "GetTerraformVersion": { - "methods": [ - "getTerraformVersion" - ] - }, - "GetResourceChange": { - "methods": [ - "getResourceChange" - ] - }, - "GetResourceDrift": { - "methods": [ - "getResourceDrift" - ] - }, - "GetAutoMigrationConfig": { - "methods": [ - "getAutoMigrationConfig" - ] - }, - "CreateDeployment": { - "methods": [ - "createDeployment" - ] - }, - "UpdateDeployment": { - "methods": [ - "updateDeployment" - ] - }, - "DeleteDeployment": { - "methods": [ - "deleteDeployment" - ] - }, - "LockDeployment": { - "methods": [ - "lockDeployment" - ] - }, - "UnlockDeployment": { - "methods": [ - "unlockDeployment" - ] - }, - "CreatePreview": { - "methods": [ - "createPreview" - ] - }, - "DeletePreview": { - "methods": [ - "deletePreview" - ] - }, - "UpdateAutoMigrationConfig": { - "methods": [ - "updateAutoMigrationConfig" - ] - }, - "ListDeployments": { - "methods": [ - "listDeployments", - "listDeploymentsStream", - "listDeploymentsAsync" - ] - }, - "ListRevisions": { - "methods": [ - "listRevisions", - "listRevisionsStream", - "listRevisionsAsync" - ] - }, - "ListResources": { - "methods": [ - "listResources", - "listResourcesStream", - "listResourcesAsync" - ] - }, - "ListPreviews": { - "methods": [ - "listPreviews", - "listPreviewsStream", - "listPreviewsAsync" - ] - }, - "ListTerraformVersions": { - "methods": [ - "listTerraformVersions", - "listTerraformVersionsStream", - "listTerraformVersionsAsync" - ] - }, - "ListResourceChanges": { - "methods": [ - "listResourceChanges", - "listResourceChangesStream", - "listResourceChangesAsync" - ] - }, - "ListResourceDrifts": { - "methods": [ - "listResourceDrifts", - "listResourceDriftsStream", - "listResourceDriftsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-config/src/v1/index.ts b/owl-bot-staging/google-cloud-config/src/v1/index.ts deleted file mode 100644 index 1e486407673..00000000000 --- a/owl-bot-staging/google-cloud-config/src/v1/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 {ConfigClient} from './config_client'; diff --git a/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 50af44d34cf..00000000000 --- a/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 config = require('@google-cloud/config'); - -function main() { - const configClient = new config.ConfigClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 273682dac59..00000000000 --- a/owl-bot-staging/google-cloud-config/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 {ConfigClient} from '@google-cloud/config'; - -// check that the client class type name can be used -function doStuffWithConfigClient(client: ConfigClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const configClient = new ConfigClient(); - doStuffWithConfigClient(configClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-config/system-test/install.ts b/owl-bot-staging/google-cloud-config/system-test/install.ts deleted file mode 100644 index 394f3362d20..00000000000 --- a/owl-bot-staging/google-cloud-config/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-cloud-config/test/gapic_config_v1.ts b/owl-bot-staging/google-cloud-config/test/gapic_config_v1.ts deleted file mode 100644 index 893be72024a..00000000000 --- a/owl-bot-staging/google-cloud-config/test/gapic_config_v1.ts +++ /dev/null @@ -1,5966 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.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 configModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, IamProtos, LocationProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -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) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.ConfigClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new configModule.v1.ConfigClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'config.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new configModule.v1.ConfigClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = configModule.v1.ConfigClient.servicePath; - assert.strictEqual(servicePath, 'config.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = configModule.v1.ConfigClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'config.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new configModule.v1.ConfigClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'config.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new configModule.v1.ConfigClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'config.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new configModule.v1.ConfigClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'config.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new configModule.v1.ConfigClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'config.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new configModule.v1.ConfigClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = configModule.v1.ConfigClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new configModule.v1.ConfigClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new configModule.v1.ConfigClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.configStub, undefined); - await client.initialize(); - assert(client.configStub); - }); - - it('has close method for the initialized client', done => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize().catch(err => {throw err}); - assert(client.configStub); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has close method for the non-initialized client', done => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.configStub, undefined); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new configModule.v1.ConfigClient({ - 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 configModule.v1.ConfigClient({ - 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('getDeployment', () => { - it('invokes getDeployment without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Deployment() - ); - client.innerApiCalls.getDeployment = stubSimpleCall(expectedResponse); - const [response] = await client.getDeployment(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDeployment without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Deployment() - ); - client.innerApiCalls.getDeployment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDeployment( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IDeployment|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDeployment with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getDeployment = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getDeployment(request), expectedError); - const actualRequest = (client.innerApiCalls.getDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDeployment with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getDeployment(request), expectedError); - }); - }); - - describe('getRevision', () => { - it('invokes getRevision without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetRevisionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetRevisionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Revision() - ); - client.innerApiCalls.getRevision = stubSimpleCall(expectedResponse); - const [response] = await client.getRevision(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRevision as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRevision as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRevision without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetRevisionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetRevisionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Revision() - ); - client.innerApiCalls.getRevision = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getRevision( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IRevision|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRevision as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRevision as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRevision with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetRevisionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetRevisionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getRevision = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getRevision(request), expectedError); - const actualRequest = (client.innerApiCalls.getRevision as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRevision as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRevision with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetRevisionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetRevisionRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getRevision(request), expectedError); - }); - }); - - describe('getResource', () => { - it('invokes getResource without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Resource() - ); - client.innerApiCalls.getResource = stubSimpleCall(expectedResponse); - const [response] = await client.getResource(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getResource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getResource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getResource without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Resource() - ); - client.innerApiCalls.getResource = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getResource( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IResource|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getResource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getResource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getResource with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getResource = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getResource(request), expectedError); - const actualRequest = (client.innerApiCalls.getResource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getResource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getResource with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getResource(request), expectedError); - }); - }); - - describe('exportDeploymentStatefile', () => { - it('invokes exportDeploymentStatefile without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportDeploymentStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Statefile() - ); - client.innerApiCalls.exportDeploymentStatefile = stubSimpleCall(expectedResponse); - const [response] = await client.exportDeploymentStatefile(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportDeploymentStatefile without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportDeploymentStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Statefile() - ); - client.innerApiCalls.exportDeploymentStatefile = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.exportDeploymentStatefile( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IStatefile|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportDeploymentStatefile with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportDeploymentStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportDeploymentStatefile = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.exportDeploymentStatefile(request), expectedError); - const actualRequest = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportDeploymentStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportDeploymentStatefile with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportDeploymentStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.exportDeploymentStatefile(request), expectedError); - }); - }); - - describe('exportRevisionStatefile', () => { - it('invokes exportRevisionStatefile without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportRevisionStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Statefile() - ); - client.innerApiCalls.exportRevisionStatefile = stubSimpleCall(expectedResponse); - const [response] = await client.exportRevisionStatefile(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.exportRevisionStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportRevisionStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportRevisionStatefile without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportRevisionStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Statefile() - ); - client.innerApiCalls.exportRevisionStatefile = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.exportRevisionStatefile( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IStatefile|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.exportRevisionStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportRevisionStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportRevisionStatefile with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportRevisionStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportRevisionStatefile = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.exportRevisionStatefile(request), expectedError); - const actualRequest = (client.innerApiCalls.exportRevisionStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportRevisionStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportRevisionStatefile with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportRevisionStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.exportRevisionStatefile(request), expectedError); - }); - }); - - describe('importStatefile', () => { - it('invokes importStatefile without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ImportStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ImportStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Statefile() - ); - client.innerApiCalls.importStatefile = stubSimpleCall(expectedResponse); - const [response] = await client.importStatefile(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.importStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importStatefile without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ImportStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ImportStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Statefile() - ); - client.innerApiCalls.importStatefile = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.importStatefile( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IStatefile|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.importStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importStatefile with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ImportStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ImportStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.importStatefile = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.importStatefile(request), expectedError); - const actualRequest = (client.innerApiCalls.importStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importStatefile with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ImportStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ImportStatefileRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.importStatefile(request), expectedError); - }); - }); - - describe('deleteStatefile', () => { - it('invokes deleteStatefile without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeleteStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeleteStatefileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteStatefile = stubSimpleCall(expectedResponse); - const [response] = await client.deleteStatefile(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStatefile without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeleteStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeleteStatefileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteStatefile = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteStatefile( - 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); - const actualRequest = (client.innerApiCalls.deleteStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStatefile with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeleteStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeleteStatefileRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteStatefile = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteStatefile(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteStatefile as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStatefile as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStatefile with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeleteStatefileRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeleteStatefileRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.deleteStatefile(request), expectedError); - }); - }); - - describe('exportLockInfo', () => { - it('invokes exportLockInfo without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportLockInfoRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportLockInfoRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.LockInfo() - ); - client.innerApiCalls.exportLockInfo = stubSimpleCall(expectedResponse); - const [response] = await client.exportLockInfo(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.exportLockInfo as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportLockInfo as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportLockInfo without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportLockInfoRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportLockInfoRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.LockInfo() - ); - client.innerApiCalls.exportLockInfo = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.exportLockInfo( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.ILockInfo|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.exportLockInfo as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportLockInfo as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportLockInfo with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportLockInfoRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportLockInfoRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportLockInfo = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.exportLockInfo(request), expectedError); - const actualRequest = (client.innerApiCalls.exportLockInfo as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportLockInfo as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportLockInfo with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportLockInfoRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportLockInfoRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.exportLockInfo(request), expectedError); - }); - }); - - describe('getPreview', () => { - it('invokes getPreview without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetPreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetPreviewRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Preview() - ); - client.innerApiCalls.getPreview = stubSimpleCall(expectedResponse); - const [response] = await client.getPreview(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPreview as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPreview as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPreview without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetPreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetPreviewRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.Preview() - ); - client.innerApiCalls.getPreview = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPreview( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IPreview|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPreview as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPreview as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPreview with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetPreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetPreviewRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPreview = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getPreview(request), expectedError); - const actualRequest = (client.innerApiCalls.getPreview as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPreview as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPreview with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetPreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetPreviewRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getPreview(request), expectedError); - }); - }); - - describe('exportPreviewResult', () => { - it('invokes exportPreviewResult without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportPreviewResultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportPreviewResultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.ExportPreviewResultResponse() - ); - client.innerApiCalls.exportPreviewResult = stubSimpleCall(expectedResponse); - const [response] = await client.exportPreviewResult(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.exportPreviewResult as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportPreviewResult as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportPreviewResult without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportPreviewResultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportPreviewResultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.ExportPreviewResultResponse() - ); - client.innerApiCalls.exportPreviewResult = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.exportPreviewResult( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IExportPreviewResultResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.exportPreviewResult as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportPreviewResult as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportPreviewResult with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportPreviewResultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportPreviewResultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportPreviewResult = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.exportPreviewResult(request), expectedError); - const actualRequest = (client.innerApiCalls.exportPreviewResult as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.exportPreviewResult as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportPreviewResult with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ExportPreviewResultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ExportPreviewResultRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.exportPreviewResult(request), expectedError); - }); - }); - - describe('getTerraformVersion', () => { - it('invokes getTerraformVersion without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetTerraformVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetTerraformVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.TerraformVersion() - ); - client.innerApiCalls.getTerraformVersion = stubSimpleCall(expectedResponse); - const [response] = await client.getTerraformVersion(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getTerraformVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTerraformVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTerraformVersion without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetTerraformVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetTerraformVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.TerraformVersion() - ); - client.innerApiCalls.getTerraformVersion = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getTerraformVersion( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.ITerraformVersion|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getTerraformVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTerraformVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTerraformVersion with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetTerraformVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetTerraformVersionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getTerraformVersion = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getTerraformVersion(request), expectedError); - const actualRequest = (client.innerApiCalls.getTerraformVersion as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTerraformVersion as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTerraformVersion with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetTerraformVersionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetTerraformVersionRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getTerraformVersion(request), expectedError); - }); - }); - - describe('getResourceChange', () => { - it('invokes getResourceChange without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceChangeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.ResourceChange() - ); - client.innerApiCalls.getResourceChange = stubSimpleCall(expectedResponse); - const [response] = await client.getResourceChange(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getResourceChange as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getResourceChange as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getResourceChange without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceChangeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.ResourceChange() - ); - client.innerApiCalls.getResourceChange = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getResourceChange( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceChange|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getResourceChange as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getResourceChange as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getResourceChange with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceChangeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getResourceChange = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getResourceChange(request), expectedError); - const actualRequest = (client.innerApiCalls.getResourceChange as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getResourceChange as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getResourceChange with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceChangeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getResourceChange(request), expectedError); - }); - }); - - describe('getResourceDrift', () => { - it('invokes getResourceDrift without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceDriftRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.ResourceDrift() - ); - client.innerApiCalls.getResourceDrift = stubSimpleCall(expectedResponse); - const [response] = await client.getResourceDrift(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getResourceDrift as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getResourceDrift as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getResourceDrift without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceDriftRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.ResourceDrift() - ); - client.innerApiCalls.getResourceDrift = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getResourceDrift( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceDrift|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getResourceDrift as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getResourceDrift as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getResourceDrift with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceDriftRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getResourceDrift = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getResourceDrift(request), expectedError); - const actualRequest = (client.innerApiCalls.getResourceDrift as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getResourceDrift as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getResourceDrift with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetResourceDriftRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getResourceDrift(request), expectedError); - }); - }); - - describe('getAutoMigrationConfig', () => { - it('invokes getAutoMigrationConfig without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.AutoMigrationConfig() - ); - client.innerApiCalls.getAutoMigrationConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getAutoMigrationConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAutoMigrationConfig without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.config.v1.AutoMigrationConfig() - ); - client.innerApiCalls.getAutoMigrationConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAutoMigrationConfig( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IAutoMigrationConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAutoMigrationConfig with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAutoMigrationConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAutoMigrationConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAutoMigrationConfig with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getAutoMigrationConfig(request), expectedError); - }); - }); - - describe('createDeployment', () => { - it('invokes createDeployment without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.CreateDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.CreateDeploymentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDeployment = stubLongRunningCall(expectedResponse); - const [operation] = await client.createDeployment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDeployment without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.CreateDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.CreateDeploymentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDeployment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createDeployment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDeployment with call error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.CreateDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.CreateDeploymentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDeployment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createDeployment(request), expectedError); - const actualRequest = (client.innerApiCalls.createDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDeployment with LRO error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.CreateDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.CreateDeploymentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDeployment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createDeployment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateDeploymentProgress without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateDeploymentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateDeploymentProgress with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateDeploymentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateDeployment', () => { - it('invokes updateDeployment without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UpdateDeploymentRequest() - ); - request.deployment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UpdateDeploymentRequest', ['deployment', 'name']); - request.deployment.name = defaultValue1; - const expectedHeaderRequestParams = `deployment.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDeployment = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateDeployment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDeployment without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UpdateDeploymentRequest() - ); - request.deployment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UpdateDeploymentRequest', ['deployment', 'name']); - request.deployment.name = defaultValue1; - const expectedHeaderRequestParams = `deployment.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDeployment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateDeployment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDeployment with call error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UpdateDeploymentRequest() - ); - request.deployment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UpdateDeploymentRequest', ['deployment', 'name']); - request.deployment.name = defaultValue1; - const expectedHeaderRequestParams = `deployment.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDeployment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateDeployment(request), expectedError); - const actualRequest = (client.innerApiCalls.updateDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDeployment with LRO error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UpdateDeploymentRequest() - ); - request.deployment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UpdateDeploymentRequest', ['deployment', 'name']); - request.deployment.name = defaultValue1; - const expectedHeaderRequestParams = `deployment.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDeployment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateDeployment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateDeploymentProgress without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateDeploymentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateDeploymentProgress with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUpdateDeploymentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteDeployment', () => { - it('invokes deleteDeployment without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeleteDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeleteDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDeployment = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteDeployment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDeployment without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeleteDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeleteDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDeployment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteDeployment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDeployment with call error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeleteDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeleteDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDeployment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteDeployment(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDeployment with LRO error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeleteDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeleteDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDeployment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteDeployment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteDeploymentProgress without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteDeploymentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteDeploymentProgress with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteDeploymentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('lockDeployment', () => { - it('invokes lockDeployment without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.LockDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.LockDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.lockDeployment = stubLongRunningCall(expectedResponse); - const [operation] = await client.lockDeployment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.lockDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.lockDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes lockDeployment without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.LockDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.LockDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.lockDeployment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.lockDeployment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.lockDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.lockDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes lockDeployment with call error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.LockDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.LockDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.lockDeployment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.lockDeployment(request), expectedError); - const actualRequest = (client.innerApiCalls.lockDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.lockDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes lockDeployment with LRO error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.LockDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.LockDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.lockDeployment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.lockDeployment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.lockDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.lockDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkLockDeploymentProgress without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkLockDeploymentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkLockDeploymentProgress with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkLockDeploymentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('unlockDeployment', () => { - it('invokes unlockDeployment without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UnlockDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UnlockDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.unlockDeployment = stubLongRunningCall(expectedResponse); - const [operation] = await client.unlockDeployment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.unlockDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.unlockDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes unlockDeployment without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UnlockDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UnlockDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.unlockDeployment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.unlockDeployment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.unlockDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.unlockDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes unlockDeployment with call error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UnlockDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UnlockDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.unlockDeployment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.unlockDeployment(request), expectedError); - const actualRequest = (client.innerApiCalls.unlockDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.unlockDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes unlockDeployment with LRO error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UnlockDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UnlockDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.unlockDeployment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.unlockDeployment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.unlockDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.unlockDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUnlockDeploymentProgress without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUnlockDeploymentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUnlockDeploymentProgress with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUnlockDeploymentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createPreview', () => { - it('invokes createPreview without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.CreatePreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.CreatePreviewRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createPreview = stubLongRunningCall(expectedResponse); - const [operation] = await client.createPreview(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createPreview as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPreview as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPreview without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.CreatePreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.CreatePreviewRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createPreview = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createPreview( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createPreview as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPreview as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPreview with call error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.CreatePreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.CreatePreviewRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createPreview = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createPreview(request), expectedError); - const actualRequest = (client.innerApiCalls.createPreview as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPreview as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPreview with LRO error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.CreatePreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.CreatePreviewRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createPreview = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createPreview(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createPreview as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPreview as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreatePreviewProgress without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreatePreviewProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreatePreviewProgress with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreatePreviewProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deletePreview', () => { - it('invokes deletePreview without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeletePreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeletePreviewRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deletePreview = stubLongRunningCall(expectedResponse); - const [operation] = await client.deletePreview(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deletePreview as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePreview as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePreview without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeletePreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeletePreviewRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deletePreview = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deletePreview( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deletePreview as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePreview as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePreview with call error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeletePreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeletePreviewRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePreview = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deletePreview(request), expectedError); - const actualRequest = (client.innerApiCalls.deletePreview as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePreview as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePreview with LRO error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.DeletePreviewRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.DeletePreviewRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePreview = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deletePreview(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deletePreview as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePreview as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeletePreviewProgress without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeletePreviewProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeletePreviewProgress with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeletePreviewProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateAutoMigrationConfig', () => { - it('invokes updateAutoMigrationConfig without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() - ); - request.autoMigrationConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); - request.autoMigrationConfig.name = defaultValue1; - const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateAutoMigrationConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAutoMigrationConfig without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() - ); - request.autoMigrationConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); - request.autoMigrationConfig.name = defaultValue1; - const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateAutoMigrationConfig( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAutoMigrationConfig with call error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() - ); - request.autoMigrationConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); - request.autoMigrationConfig.name = defaultValue1; - const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateAutoMigrationConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAutoMigrationConfig with LRO error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() - ); - request.autoMigrationConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); - request.autoMigrationConfig.name = defaultValue1; - const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateAutoMigrationConfig(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateAutoMigrationConfigProgress without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateAutoMigrationConfigProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateAutoMigrationConfigProgress with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUpdateAutoMigrationConfigProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listDeployments', () => { - it('invokes listDeployments without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - ]; - client.innerApiCalls.listDeployments = stubSimpleCall(expectedResponse); - const [response] = await client.listDeployments(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDeployments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDeployments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDeployments without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - ]; - client.innerApiCalls.listDeployments = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDeployments( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IDeployment[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDeployments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDeployments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDeployments with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDeployments = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDeployments(request), expectedError); - const actualRequest = (client.innerApiCalls.listDeployments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDeployments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDeploymentsStream without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - ]; - client.descriptors.page.listDeployments.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDeploymentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.Deployment[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.Deployment) => { - 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.listDeployments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDeployments, request)); - assert( - (client.descriptors.page.listDeployments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDeploymentsStream with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listDeployments.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDeploymentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.Deployment[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.Deployment) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDeployments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDeployments, request)); - assert( - (client.descriptors.page.listDeployments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDeployments without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - generateSampleMessage(new protos.google.cloud.config.v1.Deployment()), - ]; - client.descriptors.page.listDeployments.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.config.v1.IDeployment[] = []; - const iterable = client.listDeploymentsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDeployments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDeployments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDeployments with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listDeployments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDeploymentsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.config.v1.IDeployment[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDeployments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDeployments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listRevisions', () => { - it('invokes listRevisions without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListRevisionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - ]; - client.innerApiCalls.listRevisions = stubSimpleCall(expectedResponse); - const [response] = await client.listRevisions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRevisions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRevisions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRevisions without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListRevisionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - ]; - client.innerApiCalls.listRevisions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listRevisions( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IRevision[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRevisions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRevisions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRevisions with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListRevisionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listRevisions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listRevisions(request), expectedError); - const actualRequest = (client.innerApiCalls.listRevisions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRevisions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRevisionsStream without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListRevisionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - ]; - client.descriptors.page.listRevisions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listRevisionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.Revision[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.Revision) => { - 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.listRevisions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRevisions, request)); - assert( - (client.descriptors.page.listRevisions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listRevisionsStream with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListRevisionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listRevisions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listRevisionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.Revision[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.Revision) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listRevisions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRevisions, request)); - assert( - (client.descriptors.page.listRevisions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRevisions without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListRevisionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - generateSampleMessage(new protos.google.cloud.config.v1.Revision()), - ]; - client.descriptors.page.listRevisions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.config.v1.IRevision[] = []; - const iterable = client.listRevisionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listRevisions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRevisions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRevisions with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListRevisionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListRevisionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listRevisions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listRevisionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.config.v1.IRevision[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listRevisions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRevisions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listResources', () => { - it('invokes listResources without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - ]; - client.innerApiCalls.listResources = stubSimpleCall(expectedResponse); - const [response] = await client.listResources(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listResources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listResources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listResources without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - ]; - client.innerApiCalls.listResources = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listResources( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IResource[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listResources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listResources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listResources with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listResources = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listResources(request), expectedError); - const actualRequest = (client.innerApiCalls.listResources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listResources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listResourcesStream without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - ]; - client.descriptors.page.listResources.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listResourcesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.Resource[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.Resource) => { - 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.listResources.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listResources, request)); - assert( - (client.descriptors.page.listResources.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listResourcesStream with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listResources.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listResourcesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.Resource[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.Resource) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listResources.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listResources, request)); - assert( - (client.descriptors.page.listResources.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listResources without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - generateSampleMessage(new protos.google.cloud.config.v1.Resource()), - ]; - client.descriptors.page.listResources.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.config.v1.IResource[] = []; - const iterable = client.listResourcesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listResources.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listResources.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listResources with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listResources.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listResourcesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.config.v1.IResource[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listResources.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listResources.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listPreviews', () => { - it('invokes listPreviews without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListPreviewsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - ]; - client.innerApiCalls.listPreviews = stubSimpleCall(expectedResponse); - const [response] = await client.listPreviews(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPreviews as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPreviews as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPreviews without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListPreviewsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - ]; - client.innerApiCalls.listPreviews = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listPreviews( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IPreview[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPreviews as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPreviews as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPreviews with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListPreviewsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listPreviews = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listPreviews(request), expectedError); - const actualRequest = (client.innerApiCalls.listPreviews as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPreviews as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPreviewsStream without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListPreviewsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - ]; - client.descriptors.page.listPreviews.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listPreviewsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.Preview[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.Preview) => { - 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.listPreviews.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPreviews, request)); - assert( - (client.descriptors.page.listPreviews.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listPreviewsStream with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListPreviewsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listPreviews.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listPreviewsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.Preview[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.Preview) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listPreviews.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPreviews, request)); - assert( - (client.descriptors.page.listPreviews.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPreviews without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListPreviewsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - generateSampleMessage(new protos.google.cloud.config.v1.Preview()), - ]; - client.descriptors.page.listPreviews.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.config.v1.IPreview[] = []; - const iterable = client.listPreviewsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listPreviews.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPreviews.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPreviews with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListPreviewsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListPreviewsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listPreviews.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPreviewsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.config.v1.IPreview[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listPreviews.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPreviews.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listTerraformVersions', () => { - it('invokes listTerraformVersions without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListTerraformVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - ]; - client.innerApiCalls.listTerraformVersions = stubSimpleCall(expectedResponse); - const [response] = await client.listTerraformVersions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listTerraformVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTerraformVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTerraformVersions without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListTerraformVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - ]; - client.innerApiCalls.listTerraformVersions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listTerraformVersions( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.ITerraformVersion[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listTerraformVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTerraformVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTerraformVersions with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListTerraformVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listTerraformVersions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listTerraformVersions(request), expectedError); - const actualRequest = (client.innerApiCalls.listTerraformVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTerraformVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTerraformVersionsStream without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListTerraformVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - ]; - client.descriptors.page.listTerraformVersions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listTerraformVersionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.TerraformVersion[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.TerraformVersion) => { - 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.listTerraformVersions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listTerraformVersions, request)); - assert( - (client.descriptors.page.listTerraformVersions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listTerraformVersionsStream with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListTerraformVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listTerraformVersions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listTerraformVersionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.TerraformVersion[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.TerraformVersion) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listTerraformVersions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listTerraformVersions, request)); - assert( - (client.descriptors.page.listTerraformVersions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTerraformVersions without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListTerraformVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - generateSampleMessage(new protos.google.cloud.config.v1.TerraformVersion()), - ]; - client.descriptors.page.listTerraformVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.config.v1.ITerraformVersion[] = []; - const iterable = client.listTerraformVersionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listTerraformVersions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listTerraformVersions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTerraformVersions with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListTerraformVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListTerraformVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listTerraformVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listTerraformVersionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.config.v1.ITerraformVersion[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listTerraformVersions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listTerraformVersions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listResourceChanges', () => { - it('invokes listResourceChanges without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceChangesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - ]; - client.innerApiCalls.listResourceChanges = stubSimpleCall(expectedResponse); - const [response] = await client.listResourceChanges(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listResourceChanges as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listResourceChanges as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listResourceChanges without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceChangesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - ]; - client.innerApiCalls.listResourceChanges = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listResourceChanges( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceChange[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listResourceChanges as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listResourceChanges as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listResourceChanges with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceChangesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listResourceChanges = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listResourceChanges(request), expectedError); - const actualRequest = (client.innerApiCalls.listResourceChanges as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listResourceChanges as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listResourceChangesStream without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceChangesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - ]; - client.descriptors.page.listResourceChanges.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listResourceChangesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.ResourceChange[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.ResourceChange) => { - 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.listResourceChanges.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listResourceChanges, request)); - assert( - (client.descriptors.page.listResourceChanges.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listResourceChangesStream with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceChangesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listResourceChanges.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listResourceChangesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.ResourceChange[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.ResourceChange) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listResourceChanges.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listResourceChanges, request)); - assert( - (client.descriptors.page.listResourceChanges.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listResourceChanges without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceChangesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), - ]; - client.descriptors.page.listResourceChanges.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.config.v1.IResourceChange[] = []; - const iterable = client.listResourceChangesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listResourceChanges with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceChangesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listResourceChanges.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listResourceChangesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.config.v1.IResourceChange[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listResourceDrifts', () => { - it('invokes listResourceDrifts without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceDriftsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - ]; - client.innerApiCalls.listResourceDrifts = stubSimpleCall(expectedResponse); - const [response] = await client.listResourceDrifts(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listResourceDrifts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listResourceDrifts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listResourceDrifts without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceDriftsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - ]; - client.innerApiCalls.listResourceDrifts = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listResourceDrifts( - request, - (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceDrift[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listResourceDrifts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listResourceDrifts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listResourceDrifts with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceDriftsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listResourceDrifts = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listResourceDrifts(request), expectedError); - const actualRequest = (client.innerApiCalls.listResourceDrifts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listResourceDrifts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listResourceDriftsStream without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceDriftsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - ]; - client.descriptors.page.listResourceDrifts.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listResourceDriftsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.ResourceDrift[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.ResourceDrift) => { - 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.listResourceDrifts.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listResourceDrifts, request)); - assert( - (client.descriptors.page.listResourceDrifts.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listResourceDriftsStream with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceDriftsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listResourceDrifts.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listResourceDriftsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.config.v1.ResourceDrift[] = []; - stream.on('data', (response: protos.google.cloud.config.v1.ResourceDrift) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listResourceDrifts.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listResourceDrifts, request)); - assert( - (client.descriptors.page.listResourceDrifts.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listResourceDrifts without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceDriftsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), - ]; - client.descriptors.page.listResourceDrifts.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.config.v1.IResourceDrift[] = []; - const iterable = client.listResourceDriftsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listResourceDrifts with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.config.v1.ListResourceDriftsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listResourceDrifts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listResourceDriftsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.config.v1.IResourceDrift[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); - const response = await client.getIamPolicy(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getIamPolicy without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.getIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - expectedOptions, - (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0)); - }); - it('invokes getIamPolicy with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getIamPolicy(request, expectedOptions), expectedError); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); - const response = await client.setIamPolicy(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.iamClient.setIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes setIamPolicy without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.setIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - expectedOptions, - (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.setIamPolicy as SinonStub) - .getCall(0)); - }); - it('invokes setIamPolicy with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setIamPolicy(request, expectedOptions), expectedError); - assert((client.iamClient.setIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsResponse() - ); - client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); - const response = await client.testIamPermissions(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.iamClient.testIamPermissions as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes testIamPermissions without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsResponse() - ); - client.iamClient.testIamPermissions = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - expectedOptions, - (err?: Error|null, result?: IamProtos.google.iam.v1.TestIamPermissionsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.testIamPermissions as SinonStub) - .getCall(0)); - }); - it('invokes testIamPermissions with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.testIamPermissions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.testIamPermissions(request, expectedOptions), expectedError); - assert((client.iamClient.testIamPermissions as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getLocation without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLocation(request, expectedOptions), expectedError); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.IOperation[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.IOperation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('autoMigrationConfig', async () => { - const fakePath = "/rendered/path/autoMigrationConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.autoMigrationConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.autoMigrationConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('autoMigrationConfigPath', () => { - const result = client.autoMigrationConfigPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.autoMigrationConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAutoMigrationConfigName', () => { - const result = client.matchProjectFromAutoMigrationConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.autoMigrationConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAutoMigrationConfigName', () => { - const result = client.matchLocationFromAutoMigrationConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.autoMigrationConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('deployment', async () => { - const fakePath = "/rendered/path/deployment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - deployment: "deploymentValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.deploymentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.deploymentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('deploymentPath', () => { - const result = client.deploymentPath("projectValue", "locationValue", "deploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.deploymentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDeploymentName', () => { - const result = client.matchProjectFromDeploymentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDeploymentName', () => { - const result = client.matchLocationFromDeploymentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDeploymentFromDeploymentName', () => { - const result = client.matchDeploymentFromDeploymentName(fakePath); - assert.strictEqual(result, "deploymentValue"); - assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', async () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.locationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.locationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('preview', async () => { - const fakePath = "/rendered/path/preview"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - preview: "previewValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.previewPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.previewPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('previewPath', () => { - const result = client.previewPath("projectValue", "locationValue", "previewValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.previewPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromPreviewName', () => { - const result = client.matchProjectFromPreviewName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.previewPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromPreviewName', () => { - const result = client.matchLocationFromPreviewName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.previewPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPreviewFromPreviewName', () => { - const result = client.matchPreviewFromPreviewName(fakePath); - assert.strictEqual(result, "previewValue"); - assert((client.pathTemplates.previewPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('resource', async () => { - const fakePath = "/rendered/path/resource"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - deployment: "deploymentValue", - revision: "revisionValue", - resource: "resourceValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.resourcePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.resourcePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('resourcePath', () => { - const result = client.resourcePath("projectValue", "locationValue", "deploymentValue", "revisionValue", "resourceValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.resourcePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromResourceName', () => { - const result = client.matchProjectFromResourceName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.resourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromResourceName', () => { - const result = client.matchLocationFromResourceName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.resourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDeploymentFromResourceName', () => { - const result = client.matchDeploymentFromResourceName(fakePath); - assert.strictEqual(result, "deploymentValue"); - assert((client.pathTemplates.resourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRevisionFromResourceName', () => { - const result = client.matchRevisionFromResourceName(fakePath); - assert.strictEqual(result, "revisionValue"); - assert((client.pathTemplates.resourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchResourceFromResourceName', () => { - const result = client.matchResourceFromResourceName(fakePath); - assert.strictEqual(result, "resourceValue"); - assert((client.pathTemplates.resourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('resourceChange', async () => { - const fakePath = "/rendered/path/resourceChange"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - preview: "previewValue", - resource_change: "resourceChangeValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.resourceChangePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.resourceChangePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('resourceChangePath', () => { - const result = client.resourceChangePath("projectValue", "locationValue", "previewValue", "resourceChangeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.resourceChangePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromResourceChangeName', () => { - const result = client.matchProjectFromResourceChangeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromResourceChangeName', () => { - const result = client.matchLocationFromResourceChangeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPreviewFromResourceChangeName', () => { - const result = client.matchPreviewFromResourceChangeName(fakePath); - assert.strictEqual(result, "previewValue"); - assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchResourceChangeFromResourceChangeName', () => { - const result = client.matchResourceChangeFromResourceChangeName(fakePath); - assert.strictEqual(result, "resourceChangeValue"); - assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('resourceDrift', async () => { - const fakePath = "/rendered/path/resourceDrift"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - preview: "previewValue", - resource_drift: "resourceDriftValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.resourceDriftPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.resourceDriftPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('resourceDriftPath', () => { - const result = client.resourceDriftPath("projectValue", "locationValue", "previewValue", "resourceDriftValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.resourceDriftPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromResourceDriftName', () => { - const result = client.matchProjectFromResourceDriftName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromResourceDriftName', () => { - const result = client.matchLocationFromResourceDriftName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPreviewFromResourceDriftName', () => { - const result = client.matchPreviewFromResourceDriftName(fakePath); - assert.strictEqual(result, "previewValue"); - assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchResourceDriftFromResourceDriftName', () => { - const result = client.matchResourceDriftFromResourceDriftName(fakePath); - assert.strictEqual(result, "resourceDriftValue"); - assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('revision', async () => { - const fakePath = "/rendered/path/revision"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - deployment: "deploymentValue", - revision: "revisionValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.revisionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.revisionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('revisionPath', () => { - const result = client.revisionPath("projectValue", "locationValue", "deploymentValue", "revisionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.revisionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromRevisionName', () => { - const result = client.matchProjectFromRevisionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.revisionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromRevisionName', () => { - const result = client.matchLocationFromRevisionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.revisionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDeploymentFromRevisionName', () => { - const result = client.matchDeploymentFromRevisionName(fakePath); - assert.strictEqual(result, "deploymentValue"); - assert((client.pathTemplates.revisionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRevisionFromRevisionName', () => { - const result = client.matchRevisionFromRevisionName(fakePath); - assert.strictEqual(result, "revisionValue"); - assert((client.pathTemplates.revisionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('serviceAccount', async () => { - const fakePath = "/rendered/path/serviceAccount"; - const expectedParameters = { - project: "projectValue", - service_account: "serviceAccountValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.serviceAccountPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.serviceAccountPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('serviceAccountPath', () => { - const result = client.serviceAccountPath("projectValue", "serviceAccountValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.serviceAccountPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromServiceAccountName', () => { - const result = client.matchProjectFromServiceAccountName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.serviceAccountPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchServiceAccountFromServiceAccountName', () => { - const result = client.matchServiceAccountFromServiceAccountName(fakePath); - assert.strictEqual(result, "serviceAccountValue"); - assert((client.pathTemplates.serviceAccountPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('terraformVersion', async () => { - const fakePath = "/rendered/path/terraformVersion"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - terraform_version: "terraformVersionValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.terraformVersionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.terraformVersionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('terraformVersionPath', () => { - const result = client.terraformVersionPath("projectValue", "locationValue", "terraformVersionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.terraformVersionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromTerraformVersionName', () => { - const result = client.matchProjectFromTerraformVersionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.terraformVersionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromTerraformVersionName', () => { - const result = client.matchLocationFromTerraformVersionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.terraformVersionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTerraformVersionFromTerraformVersionName', () => { - const result = client.matchTerraformVersionFromTerraformVersionName(fakePath); - assert.strictEqual(result, "terraformVersionValue"); - assert((client.pathTemplates.terraformVersionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('workerPool', async () => { - const fakePath = "/rendered/path/workerPool"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - worker_pool: "workerPoolValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.workerPoolPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.workerPoolPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('workerPoolPath', () => { - const result = client.workerPoolPath("projectValue", "locationValue", "workerPoolValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.workerPoolPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromWorkerPoolName', () => { - const result = client.matchProjectFromWorkerPoolName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.workerPoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromWorkerPoolName', () => { - const result = client.matchLocationFromWorkerPoolName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.workerPoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchWorkerPoolFromWorkerPoolName', () => { - const result = client.matchWorkerPoolFromWorkerPoolName(fakePath); - assert.strictEqual(result, "workerPoolValue"); - assert((client.pathTemplates.workerPoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-config/tsconfig.json b/owl-bot-staging/google-cloud-config/tsconfig.json deleted file mode 100644 index ca73e7bfc82..00000000000 --- a/owl-bot-staging/google-cloud-config/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2023", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts", - "src/**/*.json", - "samples/**/*.json", - "protos/protos.json" - ] -} diff --git a/owl-bot-staging/google-cloud-config/webpack.config.js b/owl-bot-staging/google-cloud-config/webpack.config.js deleted file mode 100644 index 3f5cc816cee..00000000000 --- a/owl-bot-staging/google-cloud-config/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -const path = require('path'); - -module.exports = { - entry: './src/index.ts', - output: { - library: 'Config', - filename: './config.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/packages/google-cloud-config/.jsdoc.js b/packages/google-cloud-config/.jsdoc.js index c452fde79c0..a73893518ad 100644 --- a/packages/google-cloud-config/.jsdoc.js +++ b/packages/google-cloud-config/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 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 2025 Google LLC', + copyright: 'Copyright 2026 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/config', diff --git a/packages/google-cloud-config/.mocharc.js b/packages/google-cloud-config/.mocharc.js index 24e9d15257f..5eb34e86c87 100644 --- a/packages/google-cloud-config/.mocharc.js +++ b/packages/google-cloud-config/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/.prettierrc.js b/packages/google-cloud-config/.prettierrc.js index d89a632f90b..7649ee3c254 100644 --- a/packages/google-cloud-config/.prettierrc.js +++ b/packages/google-cloud-config/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/README.md b/packages/google-cloud-config/README.md index abf8cf622db..9c68b737b98 100644 --- a/packages/google-cloud-config/README.md +++ b/packages/google-cloud-config/README.md @@ -67,6 +67,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | export lock info | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.export_lock_info.js) | | export preview result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.export_preview_result.js) | | export revision statefile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js) | +| get auto migration config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js) | | get deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_deployment.js) | | get preview | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_preview.js) | | get resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource.js) | @@ -84,6 +85,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | list terraform versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js) | | lock deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.lock_deployment.js) | | unlock deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.unlock_deployment.js) | +| update auto migration config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js) | | update deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.update_deployment.js) | | cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json) | diff --git a/packages/google-cloud-config/protos/google/cloud/config/v1/config.proto b/packages/google-cloud-config/protos/google/cloud/config/v1/config.proto index aa8a629c10b..c45d7e95e38 100644 --- a/packages/google-cloud-config/protos/google/cloud/config/v1/config.proto +++ b/packages/google-cloud-config/protos/google/cloud/config/v1/config.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -322,6 +322,29 @@ service Config { }; option (google.api.method_signature) = "name"; } + + // Get the AutoMigrationConfig for a given project and location. + rpc GetAutoMigrationConfig(GetAutoMigrationConfigRequest) + returns (AutoMigrationConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/autoMigrationConfig}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the AutoMigrationConfig for a given project and location. + rpc UpdateAutoMigrationConfig(UpdateAutoMigrationConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{auto_migration_config.name=projects/*/locations/*/autoMigrationConfig}" + body: "auto_migration_config" + }; + option (google.api.method_signature) = "auto_migration_config,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AutoMigrationConfig" + metadata_type: "OperationMetadata" + }; + } } // Enum values to control quota checks for resources in terraform @@ -402,6 +425,9 @@ message Deployment { // Cloud Storage bucket creation failed due to an issue unrelated to // permissions. BUCKET_CREATION_FAILED = 8; + + // Failed to import values from an external source. + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 10; } // Possible lock states of a deployment. @@ -965,6 +991,9 @@ message Revision { // quota validation failed for one or more resources in terraform // configuration files. QUOTA_VALIDATION_FAILED = 7; + + // Failed to import values from an external source. + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 8; } // Blueprint that was deployed. @@ -1529,6 +1558,9 @@ message Preview { // Preview created a build but build failed and logs were generated. PREVIEW_BUILD_RUN_FAILED = 6; + + // Failed to import values from an external source. + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 7; } // Blueprint to preview. @@ -2275,3 +2307,50 @@ message ProviderConfig { optional ProviderSource source_type = 1 [(google.api.field_behavior) = OPTIONAL]; } + +// The request message for the GetAutoMigrationConfig method. +message GetAutoMigrationConfigRequest { + // Required. The name of the AutoMigrationConfig. + // Format: + // 'projects/{project_id}/locations/{location}/AutoMigrationConfig'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/AutoMigrationConfig" + } + ]; +} + +// AutoMigrationConfig contains the automigration configuration for a project. +message AutoMigrationConfig { + option (google.api.resource) = { + type: "config.googleapis.com/AutoMigrationConfig" + pattern: "projects/{project}/locations/{location}/autoMigrationConfig" + plural: "autoMigrationConfigs" + singular: "autoMigrationConfig" + }; + + // Identifier. The name of the AutoMigrationConfig. + // Format: + // 'projects/{project_id}/locations/{location}/AutoMigrationConfig'. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Time the AutoMigrationConfig was last updated. + google.protobuf.Timestamp update_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Whether the auto migration is enabled for the project. + bool auto_migration_enabled = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the UpdateAutoMigrationConfig method. +message UpdateAutoMigrationConfigRequest { + // Optional. The update mask applies to the resource. See + // [google.protobuf.FieldMask][google.protobuf.FieldMask]. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The AutoMigrationConfig to update. + AutoMigrationConfig auto_migration_config = 2 + [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-config/protos/protos.d.ts b/packages/google-cloud-config/protos/protos.d.ts index 6efa9fb34aa..28500e566ce 100644 --- a/packages/google-cloud-config/protos/protos.d.ts +++ b/packages/google-cloud-config/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -423,6 +423,34 @@ export namespace google { * @returns Promise */ public getResourceDrift(request: google.cloud.config.v1.IGetResourceDriftRequest): Promise; + + /** + * Calls GetAutoMigrationConfig. + * @param request GetAutoMigrationConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AutoMigrationConfig + */ + public getAutoMigrationConfig(request: google.cloud.config.v1.IGetAutoMigrationConfigRequest, callback: google.cloud.config.v1.Config.GetAutoMigrationConfigCallback): void; + + /** + * Calls GetAutoMigrationConfig. + * @param request GetAutoMigrationConfigRequest message or plain object + * @returns Promise + */ + public getAutoMigrationConfig(request: google.cloud.config.v1.IGetAutoMigrationConfigRequest): Promise; + + /** + * Calls UpdateAutoMigrationConfig. + * @param request UpdateAutoMigrationConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAutoMigrationConfig(request: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, callback: google.cloud.config.v1.Config.UpdateAutoMigrationConfigCallback): void; + + /** + * Calls UpdateAutoMigrationConfig. + * @param request UpdateAutoMigrationConfigRequest message or plain object + * @returns Promise + */ + public updateAutoMigrationConfig(request: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest): Promise; } namespace Config { @@ -615,6 +643,20 @@ export namespace google { * @param [response] ResourceDrift */ type GetResourceDriftCallback = (error: (Error|null), response?: google.cloud.config.v1.ResourceDrift) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getAutoMigrationConfig}. + * @param error Error, if any + * @param [response] AutoMigrationConfig + */ + type GetAutoMigrationConfigCallback = (error: (Error|null), response?: google.cloud.config.v1.AutoMigrationConfig) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|updateAutoMigrationConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAutoMigrationConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** QuotaValidation enum. */ @@ -884,7 +926,8 @@ export namespace google { DELETE_BUILD_API_FAILED = 5, DELETE_BUILD_RUN_FAILED = 6, BUCKET_CREATION_PERMISSION_DENIED = 7, - BUCKET_CREATION_FAILED = 8 + BUCKET_CREATION_FAILED = 8, + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 10 } /** LockState enum. */ @@ -2715,7 +2758,8 @@ export namespace google { CLOUD_BUILD_PERMISSION_DENIED = 1, APPLY_BUILD_API_FAILED = 4, APPLY_BUILD_RUN_FAILED = 5, - QUOTA_VALIDATION_FAILED = 7 + QUOTA_VALIDATION_FAILED = 7, + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 8 } } @@ -4936,7 +4980,8 @@ export namespace google { BUCKET_CREATION_FAILED = 3, DEPLOYMENT_LOCK_ACQUIRE_FAILED = 4, PREVIEW_BUILD_API_FAILED = 5, - PREVIEW_BUILD_RUN_FAILED = 6 + PREVIEW_BUILD_RUN_FAILED = 6, + EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 7 } } @@ -7951,6 +7996,315 @@ export namespace google { SERVICE_MAINTAINED = 1 } } + + /** Properties of a GetAutoMigrationConfigRequest. */ + interface IGetAutoMigrationConfigRequest { + + /** GetAutoMigrationConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetAutoMigrationConfigRequest. */ + class GetAutoMigrationConfigRequest implements IGetAutoMigrationConfigRequest { + + /** + * Constructs a new GetAutoMigrationConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGetAutoMigrationConfigRequest); + + /** GetAutoMigrationConfigRequest name. */ + public name: string; + + /** + * Creates a new GetAutoMigrationConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAutoMigrationConfigRequest instance + */ + public static create(properties?: google.cloud.config.v1.IGetAutoMigrationConfigRequest): google.cloud.config.v1.GetAutoMigrationConfigRequest; + + /** + * Encodes the specified GetAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. + * @param message GetAutoMigrationConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGetAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. + * @param message GetAutoMigrationConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGetAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.GetAutoMigrationConfigRequest; + + /** + * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.GetAutoMigrationConfigRequest; + + /** + * Verifies a GetAutoMigrationConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAutoMigrationConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetAutoMigrationConfigRequest; + + /** + * Creates a plain object from a GetAutoMigrationConfigRequest message. Also converts values to other types if specified. + * @param message GetAutoMigrationConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GetAutoMigrationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAutoMigrationConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAutoMigrationConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutoMigrationConfig. */ + interface IAutoMigrationConfig { + + /** AutoMigrationConfig name */ + name?: (string|null); + + /** AutoMigrationConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AutoMigrationConfig autoMigrationEnabled */ + autoMigrationEnabled?: (boolean|null); + } + + /** Represents an AutoMigrationConfig. */ + class AutoMigrationConfig implements IAutoMigrationConfig { + + /** + * Constructs a new AutoMigrationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IAutoMigrationConfig); + + /** AutoMigrationConfig name. */ + public name: string; + + /** AutoMigrationConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AutoMigrationConfig autoMigrationEnabled. */ + public autoMigrationEnabled: boolean; + + /** + * Creates a new AutoMigrationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoMigrationConfig instance + */ + public static create(properties?: google.cloud.config.v1.IAutoMigrationConfig): google.cloud.config.v1.AutoMigrationConfig; + + /** + * Encodes the specified AutoMigrationConfig message. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. + * @param message AutoMigrationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IAutoMigrationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoMigrationConfig message, length delimited. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. + * @param message AutoMigrationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IAutoMigrationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoMigrationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoMigrationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.AutoMigrationConfig; + + /** + * Decodes an AutoMigrationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoMigrationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.AutoMigrationConfig; + + /** + * Verifies an AutoMigrationConfig message. + * @param message Plain 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 AutoMigrationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoMigrationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.AutoMigrationConfig; + + /** + * Creates a plain object from an AutoMigrationConfig message. Also converts values to other types if specified. + * @param message AutoMigrationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.AutoMigrationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoMigrationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoMigrationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAutoMigrationConfigRequest. */ + interface IUpdateAutoMigrationConfigRequest { + + /** UpdateAutoMigrationConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAutoMigrationConfigRequest autoMigrationConfig */ + autoMigrationConfig?: (google.cloud.config.v1.IAutoMigrationConfig|null); + } + + /** Represents an UpdateAutoMigrationConfigRequest. */ + class UpdateAutoMigrationConfigRequest implements IUpdateAutoMigrationConfigRequest { + + /** + * Constructs a new UpdateAutoMigrationConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest); + + /** UpdateAutoMigrationConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAutoMigrationConfigRequest autoMigrationConfig. */ + public autoMigrationConfig?: (google.cloud.config.v1.IAutoMigrationConfig|null); + + /** + * Creates a new UpdateAutoMigrationConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAutoMigrationConfigRequest instance + */ + public static create(properties?: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; + + /** + * Encodes the specified UpdateAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. + * @param message UpdateAutoMigrationConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. + * @param message UpdateAutoMigrationConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; + + /** + * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; + + /** + * Verifies an UpdateAutoMigrationConfigRequest message. + * @param message Plain 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 UpdateAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAutoMigrationConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.UpdateAutoMigrationConfigRequest; + + /** + * Creates a plain object from an UpdateAutoMigrationConfigRequest message. Also converts values to other types if specified. + * @param message UpdateAutoMigrationConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.UpdateAutoMigrationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAutoMigrationConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAutoMigrationConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } } diff --git a/packages/google-cloud-config/protos/protos.js b/packages/google-cloud-config/protos/protos.js index 5799c444444..b818a1c3234 100644 --- a/packages/google-cloud-config/protos/protos.js +++ b/packages/google-cloud-config/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -989,6 +989,72 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.config.v1.Config|getAutoMigrationConfig}. + * @memberof google.cloud.config.v1.Config + * @typedef GetAutoMigrationConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.AutoMigrationConfig} [response] AutoMigrationConfig + */ + + /** + * Calls GetAutoMigrationConfig. + * @function getAutoMigrationConfig + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} request GetAutoMigrationConfigRequest message or plain object + * @param {google.cloud.config.v1.Config.GetAutoMigrationConfigCallback} callback Node-style callback called with the error, if any, and AutoMigrationConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getAutoMigrationConfig = function getAutoMigrationConfig(request, callback) { + return this.rpcCall(getAutoMigrationConfig, $root.google.cloud.config.v1.GetAutoMigrationConfigRequest, $root.google.cloud.config.v1.AutoMigrationConfig, request, callback); + }, "name", { value: "GetAutoMigrationConfig" }); + + /** + * Calls GetAutoMigrationConfig. + * @function getAutoMigrationConfig + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} request GetAutoMigrationConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|updateAutoMigrationConfig}. + * @memberof google.cloud.config.v1.Config + * @typedef UpdateAutoMigrationConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAutoMigrationConfig. + * @function updateAutoMigrationConfig + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} request UpdateAutoMigrationConfigRequest message or plain object + * @param {google.cloud.config.v1.Config.UpdateAutoMigrationConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.updateAutoMigrationConfig = function updateAutoMigrationConfig(request, callback) { + return this.rpcCall(updateAutoMigrationConfig, $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAutoMigrationConfig" }); + + /** + * Calls UpdateAutoMigrationConfig. + * @function updateAutoMigrationConfig + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} request UpdateAutoMigrationConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return Config; })(); @@ -1637,6 +1703,7 @@ case 6: case 7: case 8: + case 10: break; } if (message.deleteResults != null && message.hasOwnProperty("deleteResults")) { @@ -1843,6 +1910,10 @@ case 8: message.errorCode = 8; break; + case "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": + case 10: + message.errorCode = 10; + break; } if (object.deleteResults != null) { if (typeof object.deleteResults !== "object") @@ -2126,6 +2197,7 @@ * @property {number} DELETE_BUILD_RUN_FAILED=6 DELETE_BUILD_RUN_FAILED value * @property {number} BUCKET_CREATION_PERMISSION_DENIED=7 BUCKET_CREATION_PERMISSION_DENIED value * @property {number} BUCKET_CREATION_FAILED=8 BUCKET_CREATION_FAILED value + * @property {number} EXTERNAL_VALUE_SOURCE_IMPORT_FAILED=10 EXTERNAL_VALUE_SOURCE_IMPORT_FAILED value */ Deployment.ErrorCode = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -2136,6 +2208,7 @@ values[valuesById[6] = "DELETE_BUILD_RUN_FAILED"] = 6; values[valuesById[7] = "BUCKET_CREATION_PERMISSION_DENIED"] = 7; values[valuesById[8] = "BUCKET_CREATION_FAILED"] = 8; + values[valuesById[10] = "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED"] = 10; return values; })(); @@ -6619,6 +6692,7 @@ case 4: case 5: case 7: + case 8: break; } if (message.build != null && message.hasOwnProperty("build")) @@ -6785,6 +6859,10 @@ case 7: message.errorCode = 7; break; + case "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": + case 8: + message.errorCode = 8; + break; } if (object.build != null) message.build = String(object.build); @@ -7000,6 +7078,7 @@ * @property {number} APPLY_BUILD_API_FAILED=4 APPLY_BUILD_API_FAILED value * @property {number} APPLY_BUILD_RUN_FAILED=5 APPLY_BUILD_RUN_FAILED value * @property {number} QUOTA_VALIDATION_FAILED=7 QUOTA_VALIDATION_FAILED value + * @property {number} EXTERNAL_VALUE_SOURCE_IMPORT_FAILED=8 EXTERNAL_VALUE_SOURCE_IMPORT_FAILED value */ Revision.ErrorCode = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -7008,6 +7087,7 @@ values[valuesById[4] = "APPLY_BUILD_API_FAILED"] = 4; values[valuesById[5] = "APPLY_BUILD_RUN_FAILED"] = 5; values[valuesById[7] = "QUOTA_VALIDATION_FAILED"] = 7; + values[valuesById[8] = "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED"] = 8; return values; })(); @@ -12406,6 +12486,7 @@ case 4: case 5: case 6: + case 7: break; } if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) { @@ -12594,6 +12675,10 @@ case 6: message.errorCode = 6; break; + case "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": + case 7: + message.errorCode = 7; + break; } if (object.errorStatus != null) { if (typeof object.errorStatus !== "object") @@ -12821,6 +12906,7 @@ * @property {number} DEPLOYMENT_LOCK_ACQUIRE_FAILED=4 DEPLOYMENT_LOCK_ACQUIRE_FAILED value * @property {number} PREVIEW_BUILD_API_FAILED=5 PREVIEW_BUILD_API_FAILED value * @property {number} PREVIEW_BUILD_RUN_FAILED=6 PREVIEW_BUILD_RUN_FAILED value + * @property {number} EXTERNAL_VALUE_SOURCE_IMPORT_FAILED=7 EXTERNAL_VALUE_SOURCE_IMPORT_FAILED value */ Preview.ErrorCode = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -12831,6 +12917,7 @@ values[valuesById[4] = "DEPLOYMENT_LOCK_ACQUIRE_FAILED"] = 4; values[valuesById[5] = "PREVIEW_BUILD_API_FAILED"] = 5; values[valuesById[6] = "PREVIEW_BUILD_RUN_FAILED"] = 6; + values[valuesById[7] = "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED"] = 7; return values; })(); @@ -20320,6 +20407,707 @@ return ProviderConfig; })(); + v1.GetAutoMigrationConfigRequest = (function() { + + /** + * Properties of a GetAutoMigrationConfigRequest. + * @memberof google.cloud.config.v1 + * @interface IGetAutoMigrationConfigRequest + * @property {string|null} [name] GetAutoMigrationConfigRequest name + */ + + /** + * Constructs a new GetAutoMigrationConfigRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GetAutoMigrationConfigRequest. + * @implements IGetAutoMigrationConfigRequest + * @constructor + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest=} [properties] Properties to set + */ + function GetAutoMigrationConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAutoMigrationConfigRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @instance + */ + GetAutoMigrationConfigRequest.prototype.name = ""; + + /** + * Creates a new GetAutoMigrationConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest instance + */ + GetAutoMigrationConfigRequest.create = function create(properties) { + return new GetAutoMigrationConfigRequest(properties); + }; + + /** + * Encodes the specified GetAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} message GetAutoMigrationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAutoMigrationConfigRequest.encode = function encode(message, writer) { + 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 GetAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetAutoMigrationConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IGetAutoMigrationConfigRequest} message GetAutoMigrationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAutoMigrationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAutoMigrationConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetAutoMigrationConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAutoMigrationConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAutoMigrationConfigRequest message. + * @function verify + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAutoMigrationConfigRequest.verify = function verify(message) { + if (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 GetAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GetAutoMigrationConfigRequest} GetAutoMigrationConfigRequest + */ + GetAutoMigrationConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GetAutoMigrationConfigRequest) + return object; + var message = new $root.google.cloud.config.v1.GetAutoMigrationConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAutoMigrationConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.GetAutoMigrationConfigRequest} message GetAutoMigrationConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAutoMigrationConfigRequest.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 GetAutoMigrationConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetAutoMigrationConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAutoMigrationConfigRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.GetAutoMigrationConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAutoMigrationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GetAutoMigrationConfigRequest"; + }; + + return GetAutoMigrationConfigRequest; + })(); + + v1.AutoMigrationConfig = (function() { + + /** + * Properties of an AutoMigrationConfig. + * @memberof google.cloud.config.v1 + * @interface IAutoMigrationConfig + * @property {string|null} [name] AutoMigrationConfig name + * @property {google.protobuf.ITimestamp|null} [updateTime] AutoMigrationConfig updateTime + * @property {boolean|null} [autoMigrationEnabled] AutoMigrationConfig autoMigrationEnabled + */ + + /** + * Constructs a new AutoMigrationConfig. + * @memberof google.cloud.config.v1 + * @classdesc Represents an AutoMigrationConfig. + * @implements IAutoMigrationConfig + * @constructor + * @param {google.cloud.config.v1.IAutoMigrationConfig=} [properties] Properties to set + */ + function AutoMigrationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoMigrationConfig name. + * @member {string} name + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @instance + */ + AutoMigrationConfig.prototype.name = ""; + + /** + * AutoMigrationConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @instance + */ + AutoMigrationConfig.prototype.updateTime = null; + + /** + * AutoMigrationConfig autoMigrationEnabled. + * @member {boolean} autoMigrationEnabled + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @instance + */ + AutoMigrationConfig.prototype.autoMigrationEnabled = false; + + /** + * Creates a new AutoMigrationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {google.cloud.config.v1.IAutoMigrationConfig=} [properties] Properties to set + * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig instance + */ + AutoMigrationConfig.create = function create(properties) { + return new AutoMigrationConfig(properties); + }; + + /** + * Encodes the specified AutoMigrationConfig message. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {google.cloud.config.v1.IAutoMigrationConfig} message AutoMigrationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoMigrationConfig.encode = function encode(message, writer) { + 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.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoMigrationEnabled != null && Object.hasOwnProperty.call(message, "autoMigrationEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.autoMigrationEnabled); + return writer; + }; + + /** + * Encodes the specified AutoMigrationConfig message, length delimited. Does not implicitly {@link google.cloud.config.v1.AutoMigrationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {google.cloud.config.v1.IAutoMigrationConfig} message AutoMigrationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoMigrationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoMigrationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoMigrationConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.AutoMigrationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.autoMigrationEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoMigrationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoMigrationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoMigrationConfig message. + * @function verify + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoMigrationConfig.verify = function verify(message) { + if (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.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.autoMigrationEnabled != null && message.hasOwnProperty("autoMigrationEnabled")) + if (typeof message.autoMigrationEnabled !== "boolean") + return "autoMigrationEnabled: boolean expected"; + return null; + }; + + /** + * Creates an AutoMigrationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.AutoMigrationConfig} AutoMigrationConfig + */ + AutoMigrationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.AutoMigrationConfig) + return object; + var message = new $root.google.cloud.config.v1.AutoMigrationConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.config.v1.AutoMigrationConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.autoMigrationEnabled != null) + message.autoMigrationEnabled = Boolean(object.autoMigrationEnabled); + return message; + }; + + /** + * Creates a plain object from an AutoMigrationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {google.cloud.config.v1.AutoMigrationConfig} message AutoMigrationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoMigrationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.updateTime = null; + object.autoMigrationEnabled = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.autoMigrationEnabled != null && message.hasOwnProperty("autoMigrationEnabled")) + object.autoMigrationEnabled = message.autoMigrationEnabled; + return object; + }; + + /** + * Converts this AutoMigrationConfig to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @instance + * @returns {Object.} JSON object + */ + AutoMigrationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoMigrationConfig + * @function getTypeUrl + * @memberof google.cloud.config.v1.AutoMigrationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoMigrationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.AutoMigrationConfig"; + }; + + return AutoMigrationConfig; + })(); + + v1.UpdateAutoMigrationConfigRequest = (function() { + + /** + * Properties of an UpdateAutoMigrationConfigRequest. + * @memberof google.cloud.config.v1 + * @interface IUpdateAutoMigrationConfigRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAutoMigrationConfigRequest updateMask + * @property {google.cloud.config.v1.IAutoMigrationConfig|null} [autoMigrationConfig] UpdateAutoMigrationConfigRequest autoMigrationConfig + */ + + /** + * Constructs a new UpdateAutoMigrationConfigRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents an UpdateAutoMigrationConfigRequest. + * @implements IUpdateAutoMigrationConfigRequest + * @constructor + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest=} [properties] Properties to set + */ + function UpdateAutoMigrationConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAutoMigrationConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @instance + */ + UpdateAutoMigrationConfigRequest.prototype.updateMask = null; + + /** + * UpdateAutoMigrationConfigRequest autoMigrationConfig. + * @member {google.cloud.config.v1.IAutoMigrationConfig|null|undefined} autoMigrationConfig + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @instance + */ + UpdateAutoMigrationConfigRequest.prototype.autoMigrationConfig = null; + + /** + * Creates a new UpdateAutoMigrationConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest instance + */ + UpdateAutoMigrationConfigRequest.create = function create(properties) { + return new UpdateAutoMigrationConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateAutoMigrationConfigRequest message. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} message UpdateAutoMigrationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAutoMigrationConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.autoMigrationConfig != null && Object.hasOwnProperty.call(message, "autoMigrationConfig")) + $root.google.cloud.config.v1.AutoMigrationConfig.encode(message.autoMigrationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateAutoMigrationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.UpdateAutoMigrationConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.IUpdateAutoMigrationConfigRequest} message UpdateAutoMigrationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAutoMigrationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAutoMigrationConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.autoMigrationConfig = $root.google.cloud.config.v1.AutoMigrationConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAutoMigrationConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAutoMigrationConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAutoMigrationConfigRequest message. + * @function verify + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAutoMigrationConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.autoMigrationConfig != null && message.hasOwnProperty("autoMigrationConfig")) { + var error = $root.google.cloud.config.v1.AutoMigrationConfig.verify(message.autoMigrationConfig); + if (error) + return "autoMigrationConfig." + error; + } + return null; + }; + + /** + * Creates an UpdateAutoMigrationConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} UpdateAutoMigrationConfigRequest + */ + UpdateAutoMigrationConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest) + return object; + var message = new $root.google.cloud.config.v1.UpdateAutoMigrationConfigRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.config.v1.UpdateAutoMigrationConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.autoMigrationConfig != null) { + if (typeof object.autoMigrationConfig !== "object") + throw TypeError(".google.cloud.config.v1.UpdateAutoMigrationConfigRequest.autoMigrationConfig: object expected"); + message.autoMigrationConfig = $root.google.cloud.config.v1.AutoMigrationConfig.fromObject(object.autoMigrationConfig); + } + return message; + }; + + /** + * Creates a plain object from an UpdateAutoMigrationConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {google.cloud.config.v1.UpdateAutoMigrationConfigRequest} message UpdateAutoMigrationConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAutoMigrationConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.autoMigrationConfig = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.autoMigrationConfig != null && message.hasOwnProperty("autoMigrationConfig")) + object.autoMigrationConfig = $root.google.cloud.config.v1.AutoMigrationConfig.toObject(message.autoMigrationConfig, options); + return object; + }; + + /** + * Converts this UpdateAutoMigrationConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAutoMigrationConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAutoMigrationConfigRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.UpdateAutoMigrationConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAutoMigrationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.UpdateAutoMigrationConfigRequest"; + }; + + return UpdateAutoMigrationConfigRequest; + })(); + return v1; })(); diff --git a/packages/google-cloud-config/protos/protos.json b/packages/google-cloud-config/protos/protos.json index af62ad06368..e5bbde9c1d5 100644 --- a/packages/google-cloud-config/protos/protos.json +++ b/packages/google-cloud-config/protos/protos.json @@ -574,6 +574,52 @@ "(google.api.method_signature)": "name" } ] + }, + "GetAutoMigrationConfig": { + "requestType": "GetAutoMigrationConfigRequest", + "responseType": "AutoMigrationConfig", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/autoMigrationConfig}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/autoMigrationConfig}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateAutoMigrationConfig": { + "requestType": "UpdateAutoMigrationConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{auto_migration_config.name=projects/*/locations/*/autoMigrationConfig}", + "(google.api.http).body": "auto_migration_config", + "(google.api.method_signature)": "auto_migration_config,update_mask", + "(google.longrunning.operation_info).response_type": "AutoMigrationConfig", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{auto_migration_config.name=projects/*/locations/*/autoMigrationConfig}", + "body": "auto_migration_config" + } + }, + { + "(google.api.method_signature)": "auto_migration_config,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AutoMigrationConfig", + "metadata_type": "OperationMetadata" + } + } + ] } } }, @@ -818,7 +864,8 @@ "DELETE_BUILD_API_FAILED": 5, "DELETE_BUILD_RUN_FAILED": 6, "BUCKET_CREATION_PERMISSION_DENIED": 7, - "BUCKET_CREATION_FAILED": 8 + "BUCKET_CREATION_FAILED": 8, + "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": 10 } }, "LockState": { @@ -1377,7 +1424,8 @@ "CLOUD_BUILD_PERMISSION_DENIED": 1, "APPLY_BUILD_API_FAILED": 4, "APPLY_BUILD_RUN_FAILED": 5, - "QUOTA_VALIDATION_FAILED": 7 + "QUOTA_VALIDATION_FAILED": 7, + "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": 8 } } } @@ -2012,7 +2060,8 @@ "BUCKET_CREATION_FAILED": 3, "DEPLOYMENT_LOCK_ACQUIRE_FAILED": 4, "PREVIEW_BUILD_API_FAILED": 5, - "PREVIEW_BUILD_RUN_FAILED": 6 + "PREVIEW_BUILD_RUN_FAILED": 6, + "EXTERNAL_VALUE_SOURCE_IMPORT_FAILED": 7 } } } @@ -2785,6 +2834,67 @@ } } } + }, + "GetAutoMigrationConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/AutoMigrationConfig" + } + } + } + }, + "AutoMigrationConfig": { + "options": { + "(google.api.resource).type": "config.googleapis.com/AutoMigrationConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/autoMigrationConfig", + "(google.api.resource).plural": "autoMigrationConfigs", + "(google.api.resource).singular": "autoMigrationConfig" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "autoMigrationEnabled": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateAutoMigrationConfigRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "autoMigrationConfig": { + "type": "AutoMigrationConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } } } } diff --git a/packages/google-cloud-config/samples/generated/v1/config.create_deployment.js b/packages/google-cloud-config/samples/generated/v1/config.create_deployment.js index a6db3fec1f8..dd27af30fc1 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.create_deployment.js +++ b/packages/google-cloud-config/samples/generated/v1/config.create_deployment.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.create_preview.js b/packages/google-cloud-config/samples/generated/v1/config.create_preview.js index 021d8397bde..d5794baa2e6 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.create_preview.js +++ b/packages/google-cloud-config/samples/generated/v1/config.create_preview.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.delete_deployment.js b/packages/google-cloud-config/samples/generated/v1/config.delete_deployment.js index 5b8f52b7f83..84a517e7bde 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.delete_deployment.js +++ b/packages/google-cloud-config/samples/generated/v1/config.delete_deployment.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.delete_preview.js b/packages/google-cloud-config/samples/generated/v1/config.delete_preview.js index 3cf6a20defc..4e62f8376be 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.delete_preview.js +++ b/packages/google-cloud-config/samples/generated/v1/config.delete_preview.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.delete_statefile.js b/packages/google-cloud-config/samples/generated/v1/config.delete_statefile.js index 89365b8d9bb..801f4b27f4b 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.delete_statefile.js +++ b/packages/google-cloud-config/samples/generated/v1/config.delete_statefile.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js b/packages/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js index 05f6a041264..c010a9b1c04 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js +++ b/packages/google-cloud-config/samples/generated/v1/config.export_deployment_statefile.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.export_lock_info.js b/packages/google-cloud-config/samples/generated/v1/config.export_lock_info.js index 54328dbaf1e..177d9e4cce6 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.export_lock_info.js +++ b/packages/google-cloud-config/samples/generated/v1/config.export_lock_info.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.export_preview_result.js b/packages/google-cloud-config/samples/generated/v1/config.export_preview_result.js index 2044f031341..1b57cac143a 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.export_preview_result.js +++ b/packages/google-cloud-config/samples/generated/v1/config.export_preview_result.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js b/packages/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js index ce02dff0d31..d84fafc8b72 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js +++ b/packages/google-cloud-config/samples/generated/v1/config.export_revision_statefile.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 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/owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js b/packages/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js similarity index 100% rename from owl-bot-staging/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js rename to packages/google-cloud-config/samples/generated/v1/config.get_auto_migration_config.js diff --git a/packages/google-cloud-config/samples/generated/v1/config.get_deployment.js b/packages/google-cloud-config/samples/generated/v1/config.get_deployment.js index 2ccdb82b20a..ee6136e7cfc 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.get_deployment.js +++ b/packages/google-cloud-config/samples/generated/v1/config.get_deployment.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.get_preview.js b/packages/google-cloud-config/samples/generated/v1/config.get_preview.js index 9f1a63dc35c..b09e7592be3 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.get_preview.js +++ b/packages/google-cloud-config/samples/generated/v1/config.get_preview.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.get_resource.js b/packages/google-cloud-config/samples/generated/v1/config.get_resource.js index b9529c522ec..9bd42763798 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.get_resource.js +++ b/packages/google-cloud-config/samples/generated/v1/config.get_resource.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js b/packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js index 987dd8ff8c8..6e0f19df635 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js +++ b/packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js b/packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js index 882c274c894..8c9ef3b5a9e 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js +++ b/packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.get_revision.js b/packages/google-cloud-config/samples/generated/v1/config.get_revision.js index 4dd6fe90504..0e90690afe6 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.get_revision.js +++ b/packages/google-cloud-config/samples/generated/v1/config.get_revision.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.get_terraform_version.js b/packages/google-cloud-config/samples/generated/v1/config.get_terraform_version.js index d0c80efd295..b8afed8589b 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.get_terraform_version.js +++ b/packages/google-cloud-config/samples/generated/v1/config.get_terraform_version.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.import_statefile.js b/packages/google-cloud-config/samples/generated/v1/config.import_statefile.js index bb65383ad1e..cc21a501e90 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.import_statefile.js +++ b/packages/google-cloud-config/samples/generated/v1/config.import_statefile.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.list_deployments.js b/packages/google-cloud-config/samples/generated/v1/config.list_deployments.js index 37b32053fb2..110414edd52 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.list_deployments.js +++ b/packages/google-cloud-config/samples/generated/v1/config.list_deployments.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.list_previews.js b/packages/google-cloud-config/samples/generated/v1/config.list_previews.js index 934928250f8..5003a95b2e6 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.list_previews.js +++ b/packages/google-cloud-config/samples/generated/v1/config.list_previews.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js b/packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js index d21ea45a19c..7cbbfca0c85 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js +++ b/packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js b/packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js index 81ed178228d..7ace24aad25 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js +++ b/packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.list_resources.js b/packages/google-cloud-config/samples/generated/v1/config.list_resources.js index cf73f5c4386..c66734c42d2 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.list_resources.js +++ b/packages/google-cloud-config/samples/generated/v1/config.list_resources.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.list_revisions.js b/packages/google-cloud-config/samples/generated/v1/config.list_revisions.js index edbd2c3cc99..34e18f6d4c6 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.list_revisions.js +++ b/packages/google-cloud-config/samples/generated/v1/config.list_revisions.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js b/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js index 837f1f9f588..1f0d2b40a0f 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js +++ b/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.lock_deployment.js b/packages/google-cloud-config/samples/generated/v1/config.lock_deployment.js index 57b27dae450..1f8dabc4255 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.lock_deployment.js +++ b/packages/google-cloud-config/samples/generated/v1/config.lock_deployment.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/config.unlock_deployment.js b/packages/google-cloud-config/samples/generated/v1/config.unlock_deployment.js index 5f1ec2e1d99..0a70fa290e1 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.unlock_deployment.js +++ b/packages/google-cloud-config/samples/generated/v1/config.unlock_deployment.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 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/owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js b/packages/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js similarity index 100% rename from owl-bot-staging/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js rename to packages/google-cloud-config/samples/generated/v1/config.update_auto_migration_config.js diff --git a/packages/google-cloud-config/samples/generated/v1/config.update_deployment.js b/packages/google-cloud-config/samples/generated/v1/config.update_deployment.js index afde24383a5..dacf8c07d91 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.update_deployment.js +++ b/packages/google-cloud-config/samples/generated/v1/config.update_deployment.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json b/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json index d02d3b55417..ab843bf1d64 100644 --- a/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json +++ b/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json @@ -1270,6 +1270,90 @@ } } } + }, + { + "regionTag": "config_v1_generated_Config_GetAutoMigrationConfig_async", + "title": "Config getAutoMigrationConfig Sample", + "origin": "API_DEFINITION", + "description": " Get the AutoMigrationConfig for a given project and location.", + "canonical": true, + "file": "config.get_auto_migration_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAutoMigrationConfig", + "fullName": "google.cloud.config.v1.Config.GetAutoMigrationConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.AutoMigrationConfig", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "GetAutoMigrationConfig", + "fullName": "google.cloud.config.v1.Config.GetAutoMigrationConfig", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_UpdateAutoMigrationConfig_async", + "title": "Config updateAutoMigrationConfig Sample", + "origin": "API_DEFINITION", + "description": " Updates the AutoMigrationConfig for a given project and location.", + "canonical": true, + "file": "config.update_auto_migration_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAutoMigrationConfig", + "fullName": "google.cloud.config.v1.Config.UpdateAutoMigrationConfig", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "auto_migration_config", + "type": ".google.cloud.config.v1.AutoMigrationConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "UpdateAutoMigrationConfig", + "fullName": "google.cloud.config.v1.Config.UpdateAutoMigrationConfig", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } } ] } diff --git a/packages/google-cloud-config/src/v1/config_client.ts b/packages/google-cloud-config/src/v1/config_client.ts index e80841b7188..db62f4c8f86 100644 --- a/packages/google-cloud-config/src/v1/config_client.ts +++ b/packages/google-cloud-config/src/v1/config_client.ts @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -188,6 +188,9 @@ export class ConfigClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + autoMigrationConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/autoMigrationConfig' + ), deploymentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deployments/{deployment}' ), @@ -281,6 +284,10 @@ export class ConfigClient { '.google.cloud.config.v1.Preview') as gax.protobuf.Type; const deletePreviewMetadata = protoFilesRoot.lookup( '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; + const updateAutoMigrationConfigResponse = protoFilesRoot.lookup( + '.google.cloud.config.v1.AutoMigrationConfig') as gax.protobuf.Type; + const updateAutoMigrationConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.config.v1.OperationMetadata') as gax.protobuf.Type; this.descriptors.longrunning = { createDeployment: new this._gaxModule.LongrunningDescriptor( @@ -310,7 +317,11 @@ export class ConfigClient { deletePreview: new this._gaxModule.LongrunningDescriptor( this.operationsClient, deletePreviewResponse.decode.bind(deletePreviewResponse), - deletePreviewMetadata.decode.bind(deletePreviewMetadata)) + deletePreviewMetadata.decode.bind(deletePreviewMetadata)), + updateAutoMigrationConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAutoMigrationConfigResponse.decode.bind(updateAutoMigrationConfigResponse), + updateAutoMigrationConfigMetadata.decode.bind(updateAutoMigrationConfigMetadata)) }; // Put together the default options sent with requests. @@ -356,7 +367,7 @@ export class ConfigClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const configStubMethods = - ['listDeployments', 'getDeployment', 'createDeployment', 'updateDeployment', 'deleteDeployment', 'listRevisions', 'getRevision', 'getResource', 'listResources', 'exportDeploymentStatefile', 'exportRevisionStatefile', 'importStatefile', 'deleteStatefile', 'lockDeployment', 'unlockDeployment', 'exportLockInfo', 'createPreview', 'getPreview', 'listPreviews', 'deletePreview', 'exportPreviewResult', 'listTerraformVersions', 'getTerraformVersion', 'listResourceChanges', 'getResourceChange', 'listResourceDrifts', 'getResourceDrift']; + ['listDeployments', 'getDeployment', 'createDeployment', 'updateDeployment', 'deleteDeployment', 'listRevisions', 'getRevision', 'getResource', 'listResources', 'exportDeploymentStatefile', 'exportRevisionStatefile', 'importStatefile', 'deleteStatefile', 'lockDeployment', 'unlockDeployment', 'exportLockInfo', 'createPreview', 'getPreview', 'listPreviews', 'deletePreview', 'exportPreviewResult', 'listTerraformVersions', 'getTerraformVersion', 'listResourceChanges', 'getResourceChange', 'listResourceDrifts', 'getResourceDrift', 'getAutoMigrationConfig', 'updateAutoMigrationConfig']; for (const methodName of configStubMethods) { const callPromise = this.configStub.then( stub => (...args: Array<{}>) => { @@ -1716,6 +1727,102 @@ export class ConfigClient { throw error; }); } +/** + * Get the AutoMigrationConfig for a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the AutoMigrationConfig. + * Format: + * 'projects/{project_id}/locations/{location}/AutoMigrationConfig'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.config.v1.AutoMigrationConfig|AutoMigrationConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.get_auto_migration_config.js + * region_tag:config_v1_generated_Config_GetAutoMigrationConfig_async + */ + getAutoMigrationConfig( + request?: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|undefined, {}|undefined + ]>; + getAutoMigrationConfig( + request: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, + {}|null|undefined>): void; + getAutoMigrationConfig( + request: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, + callback: Callback< + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, + {}|null|undefined>): void; + getAutoMigrationConfig( + request?: protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getAutoMigrationConfig request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAutoMigrationConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getAutoMigrationConfig(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IAutoMigrationConfig, + protos.google.cloud.config.v1.IGetAutoMigrationConfigRequest|undefined, + {}|undefined + ]) => { + this._log.info('getAutoMigrationConfig response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } /** * Creates a {@link protos.google.cloud.config.v1.Deployment|Deployment}. @@ -2572,6 +2679,116 @@ export class ConfigClient { const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deletePreview, this._gaxModule.createDefaultBackoffSettings()); return decodeOperation as LROperation; } +/** + * Updates the AutoMigrationConfig for a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The update mask applies to the resource. See + * {@link protos.google.protobuf.FieldMask|google.protobuf.FieldMask}. + * @param {google.cloud.config.v1.AutoMigrationConfig} request.autoMigrationConfig + * Required. The AutoMigrationConfig to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.update_auto_migration_config.js + * region_tag:config_v1_generated_Config_UpdateAutoMigrationConfig_async + */ + updateAutoMigrationConfig( + request?: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAutoMigrationConfig( + request: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAutoMigrationConfig( + request: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAutoMigrationConfig( + request?: protos.google.cloud.config.v1.IUpdateAutoMigrationConfigRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'auto_migration_config.name': request.autoMigrationConfig!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateAutoMigrationConfig response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateAutoMigrationConfig request %j', request); + return this.innerApiCalls.updateAutoMigrationConfig(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateAutoMigrationConfig response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateAutoMigrationConfig()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.update_auto_migration_config.js + * region_tag:config_v1_generated_Config_UpdateAutoMigrationConfig_async + */ + async checkUpdateAutoMigrationConfigProgress(name: string): Promise>{ + this._log.info('updateAutoMigrationConfig long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateAutoMigrationConfig, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } /** * Lists {@link protos.google.cloud.config.v1.Deployment|Deployment}s in a given project * and location. @@ -4869,6 +5086,42 @@ export class ConfigClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified autoMigrationConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + autoMigrationConfigPath(project:string,location:string) { + return this.pathTemplates.autoMigrationConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AutoMigrationConfig resource. + * + * @param {string} autoMigrationConfigName + * A fully-qualified path representing AutoMigrationConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAutoMigrationConfigName(autoMigrationConfigName: string) { + return this.pathTemplates.autoMigrationConfigPathTemplate.match(autoMigrationConfigName).project; + } + + /** + * Parse the location from AutoMigrationConfig resource. + * + * @param {string} autoMigrationConfigName + * A fully-qualified path representing AutoMigrationConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAutoMigrationConfigName(autoMigrationConfigName: string) { + return this.pathTemplates.autoMigrationConfigPathTemplate.match(autoMigrationConfigName).location; + } + /** * Return a fully-qualified deployment resource name string. * diff --git a/packages/google-cloud-config/src/v1/config_client_config.json b/packages/google-cloud-config/src/v1/config_client_config.json index 727ab8bb564..5ea0334b5ba 100644 --- a/packages/google-cloud-config/src/v1/config_client_config.json +++ b/packages/google-cloud-config/src/v1/config_client_config.json @@ -166,6 +166,16 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetAutoMigrationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateAutoMigrationConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" } } } diff --git a/packages/google-cloud-config/src/v1/gapic_metadata.json b/packages/google-cloud-config/src/v1/gapic_metadata.json index f08a6825daa..171a745b9e1 100644 --- a/packages/google-cloud-config/src/v1/gapic_metadata.json +++ b/packages/google-cloud-config/src/v1/gapic_metadata.json @@ -75,6 +75,11 @@ "getResourceDrift" ] }, + "GetAutoMigrationConfig": { + "methods": [ + "getAutoMigrationConfig" + ] + }, "CreateDeployment": { "methods": [ "createDeployment" @@ -110,6 +115,11 @@ "deletePreview" ] }, + "UpdateAutoMigrationConfig": { + "methods": [ + "updateAutoMigrationConfig" + ] + }, "ListDeployments": { "methods": [ "listDeployments", @@ -229,6 +239,11 @@ "getResourceDrift" ] }, + "GetAutoMigrationConfig": { + "methods": [ + "getAutoMigrationConfig" + ] + }, "CreateDeployment": { "methods": [ "createDeployment" @@ -264,6 +279,11 @@ "deletePreview" ] }, + "UpdateAutoMigrationConfig": { + "methods": [ + "updateAutoMigrationConfig" + ] + }, "ListDeployments": { "methods": [ "listDeployments", diff --git a/packages/google-cloud-config/src/v1/index.ts b/packages/google-cloud-config/src/v1/index.ts index 17dc3f59c4f..1e486407673 100644 --- a/packages/google-cloud-config/src/v1/index.ts +++ b/packages/google-cloud-config/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/system-test/fixtures/sample/src/index.js b/packages/google-cloud-config/system-test/fixtures/sample/src/index.js index bd44ff32a33..50af44d34cf 100644 --- a/packages/google-cloud-config/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-config/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-config/system-test/fixtures/sample/src/index.ts index 3e46c1416cc..273682dac59 100644 --- a/packages/google-cloud-config/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-config/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/system-test/install.ts b/packages/google-cloud-config/system-test/install.ts index 2a505d6df0c..394f3362d20 100644 --- a/packages/google-cloud-config/system-test/install.ts +++ b/packages/google-cloud-config/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-config/test/gapic_config_v1.ts b/packages/google-cloud-config/test/gapic_config_v1.ts index 73c8e89257a..893be72024a 100644 --- a/packages/google-cloud-config/test/gapic_config_v1.ts +++ b/packages/google-cloud-config/test/gapic_config_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1679,6 +1679,114 @@ describe('v1.ConfigClient', () => { }); }); + describe('getAutoMigrationConfig', () => { + it('invokes getAutoMigrationConfig without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.AutoMigrationConfig() + ); + client.innerApiCalls.getAutoMigrationConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getAutoMigrationConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoMigrationConfig without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.AutoMigrationConfig() + ); + client.innerApiCalls.getAutoMigrationConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAutoMigrationConfig( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IAutoMigrationConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoMigrationConfig with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAutoMigrationConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAutoMigrationConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoMigrationConfig with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetAutoMigrationConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetAutoMigrationConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getAutoMigrationConfig(request), expectedError); + }); + }); + describe('createDeployment', () => { it('invokes createDeployment without error', async () => { const client = new configModule.v1.ConfigClient({ @@ -2761,6 +2869,164 @@ describe('v1.ConfigClient', () => { }); }); + describe('updateAutoMigrationConfig', () => { + it('invokes updateAutoMigrationConfig without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() + ); + request.autoMigrationConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); + request.autoMigrationConfig.name = defaultValue1; + const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAutoMigrationConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutoMigrationConfig without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() + ); + request.autoMigrationConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); + request.autoMigrationConfig.name = defaultValue1; + const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAutoMigrationConfig( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutoMigrationConfig with call error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() + ); + request.autoMigrationConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); + request.autoMigrationConfig.name = defaultValue1; + const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateAutoMigrationConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutoMigrationConfig with LRO error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.UpdateAutoMigrationConfigRequest() + ); + request.autoMigrationConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.UpdateAutoMigrationConfigRequest', ['autoMigrationConfig', 'name']); + request.autoMigrationConfig.name = defaultValue1; + const expectedHeaderRequestParams = `auto_migration_config.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAutoMigrationConfig = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateAutoMigrationConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutoMigrationConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAutoMigrationConfigProgress without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateAutoMigrationConfigProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAutoMigrationConfigProgress with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateAutoMigrationConfigProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + describe('listDeployments', () => { it('invokes listDeployments without error', async () => { const client = new configModule.v1.ConfigClient({ @@ -5175,6 +5441,44 @@ describe('v1.ConfigClient', () => { describe('Path templates', () => { + describe('autoMigrationConfig', async () => { + const fakePath = "/rendered/path/autoMigrationConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.autoMigrationConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.autoMigrationConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('autoMigrationConfigPath', () => { + const result = client.autoMigrationConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.autoMigrationConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAutoMigrationConfigName', () => { + const result = client.matchProjectFromAutoMigrationConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.autoMigrationConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAutoMigrationConfigName', () => { + const result = client.matchLocationFromAutoMigrationConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.autoMigrationConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('deployment', async () => { const fakePath = "/rendered/path/deployment"; const expectedParameters = {